I got some basic information into VFP from AutoCAD using the following:
AutoCAD_DWG = GetObject(,"AutoCAD.Application")
? AutoCAD_DWG.FullName
? AutoCAD_DWG.ActiveDocument.Blocks.Count
? AutoCAD_DWG.ActiveDocument.Namebut I need help scanning some object data from the drawing. I guess I'm not understanding something.
I have the following VBA code which is supposed to do just that. Perhaps someone can help convert it to VFP syntax:
Set ACAD = GetObject(,"AutoCAD.Application")
Set DOC = ACAD.ActiveDocument
Dim ssnew as object
Dim GC(0 to 1) as Integer
Dim GV(0 to 1) as Variant
Dim Pt1(0 to 2) as Double
Dim Pt2(0 to 2) as Double
Dim attribs
GC(0)=0
GV(0)="INSERT"
GC(1)=2
GV(1)="DOOR"
Set ssnew=DOC.SelectionSets.Add("NEWSS")
ssNew.Select acSelectionSetAll, Pt1, Pt2, Gc, Gv
FOR EACH Entity IN ssNew
attribs=entity.GetAttributes
For I = LBound(attribs) to UBound(attribs)
MsgBox attribs(I).TagString & "=" & attribs(I).TextString
Next
NextTIA
Kogo Michael Hogan
"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?
Ideate Web Site