Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto CAD files
Message
De
01/08/2005 04:36:09
 
 
À
01/08/2005 02:56:10
Maltin Lacsina
Angeles Electric Corporation
Angeles, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
MySQL
Divers
Thread ID:
01037401
Message ID:
01037415
Vues:
21
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform