Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto CAD files
Message
From
01/08/2005 04:36:09
 
 
To
01/08/2005 02:56:10
Maltin Lacsina
Angeles Electric Corporation
Angeles, Philippines
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
MySQL
Miscellaneous
Thread ID:
01037401
Message ID:
01037415
Views:
20
Hi Maltin,

I'm not exactly sure wat you are trying to do, but
maybe you can do something with my examples.

By the way. I don't know if they will work in your VFP8,
because I skipped that version. It didn't in VFP7.
This example draws a circle at 10,20 with a radius of 10.
It is possible to create complete drawings from out
your database.
goACAD = CREATEOBJECT("AutoCAD.Applicat­ion")
goACAD.Visible = .T.

DIMENSION laXCoord(3) AS Double
laXCoord(1) = 10
laXCoord(2) = 20
laXCoord(3) = 0

goacad.ActiveDocument.ModelSpa­ce.AddCircle(@laXCoord, 10)
In the other direction, you can find objects in your
drawing and change them. An example to find a block and
change two attributes.
FOR EACH loItem IN goACAD.ActiveDocument.PaperSpace
  IF loItem.ObjectName = "AcDbBlockReference"
    IF UPPER(loItem.Name) = "MYBLOCK"
      laAttributes = loItem.GetAttributes
      FOR n = 1 TO ALEN(laAttributes, 1)
        DO CASE
          CASE laAttributes(n).TagString = "NAME"
            laAttributes(n).TextString = "blabla"
          CASE laAttributes(n).TagString = "FILE"
            laAttributes(n).TextString = ALLTRIM(THISFORM.cBestand)
        ENDCASE
      ENDFOR
      EXIT
    ENDIF
  ENDIF
ENDFOR
Greetz.
Previous
Reply
Map
View

Click here to load this message in the networking platform