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
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