General information
Category:
Object Oriented Programming
I'll give it a shot, since I don't have autocad...
Local ACAD,DOC,attribs,ssnew
Local Array gc[2],gv[2],pt1[3],pt2[3],attribs[1]
ACAD = GetObject(,"AutoCAD.Application")
DOC = ACAD.ActiveDocument
GC[1]=0
GV[1]="INSERT"
GC[2]=2
GV[2]="DOOR"
ssnew=DOC.SelectionSets.Add("NEWSS")
Comarray(ssnew,10) && zero-based array passed by reference
ssNew.Select(acSelectionSetAll, @Pt1, @Pt2, @Gc, @Gv)
FOR EACH Entity IN ssNew
Comarray(entity,0) && zero-based array passed by value
attribs=entity.GetAttributes
For I = 1 To Alen(attribs,1)
MsgBox attribs(I).TagString & "=" & attribs(I).TextString
Next I
Next Entity
if this is not quite right, it is pretty close. The biggest guess is the comarray stuff. Based on the code, this looks correct.
Let me know how things go!!!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only