Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help converting VBA to VFP
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00293109
Message ID:
00293223
Views:
32
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
Map
View

Click here to load this message in the networking platform