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


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


TIA
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Next
Reply
Map
View

Click here to load this message in the networking platform