• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

vb6 cycle optimization for each - search texts

  • Thread starter Thread starter tiziano69
  • Start date Start date

tiziano69

Guest
buongiorno, ho il seguente problema, debbo analizzare soltanto le entita testo, per trovare alcuni testi che corrispondono ad una deterninata stringa, il codice qui sotto, mi analizza tutte le entità presenti nel disegno, ovviamente ci vuole molto tempo. mi aiutate ad ottimizzare il ciclo di ricerca in modo tale che analizzi soltanto le entita testo.

grazie

set objautocad = getobject(, "autocad.application")
set objmodelspace = objautocad.activedocument.modelspace()

for each objentity in objmodelspace

select case objentity.objectname
case "acdbmtext"
if instr(ucase(objentity.textstring), ucase(findtextstring)) then
bfindtext = true
pt = objentity.insertionpoint
objentity.highlight (true)
end if

case "acdbtext"
if instr(ucase(objentity.textstring), ucase(findtextstring)) then
bfindtext = true
pt = objentity.insertionpoint
objentity.highlight (true)
end if
end select

next objentity
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top