Jump to content

What is "vla" "vlax" etc etc?


Lee Mac

Recommended Posts

It ActiveX programming with Objects, Properties and Methods. For example draw a line and type in command line:

 

(vl-load-com)

 

to load Visual LISP extention which use ActiveX methods. Than save entities name to variable:

 

Command: (setq ent(car(entsel)))
Select object: <Entity name: 7efa2458>

 

I know that you able to change color of line with ENTGET, SUBST and ENTMODE functions. But is other way. Type in command line:

 

Command: (setq vlaEnt(vlax-ename->vla-object ent))
#<VLA-OBJECT IAcadLine 0211d5e4>

 

Now you have ActiveX object of your line which have Color property. Get it:

 

Command: (vla-get-Color vlaEnt)
256

 

Change it to Yellow:

 

Command: (vla-put-Color vlaEnt 2)
nil

 

Look for all Properties and Methods of Line object:

 

Command: (vlax-dump-object vlaEnt t)
; IAcadLine: AutoCAD Line Interface
; Property values:
;   Angle (RO) = 0.599194
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00d73d3c>
;   Delta (RO) = (38.0649 25.9966 0.0)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 01ff6950>
;   EndPoint = (1116.29 1004.45 0.0)
;   Handle (RO) = "1C3"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0e859b3c>
;   Layer = "0"
;   Length (RO) = 46.0951
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Material = "ByLayer"
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 2130322520
;   ObjectName (RO) = "AcDbLine"
;   OwnerID (RO) = 2130316536
;   PlotStyleName = "Color_2"
;   StartPoint = (1078.22 978.448 0.0)
;   Thickness = 0.0
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 13b8b760>
;   Visible = -1
; Methods supported:
;   ArrayPolar (3)
;   ArrayRectangular (6)
;   Copy ()
;   Delete ()
;   GetBoundingBox (2)
;   GetExtensionDictionary ()
;   GetXData (3)
;   Highlight (1)
;   IntersectWith (2)
;   Mirror (2)
;   Mirror3D (3)
;   Move (2)
;   Offset (1)
;   Rotate (2)
;   Rotate3D (3)
;   ScaleEntity (2)
;   SetXData (2)
;   TransformBy (1)
;   Update ()

 

All Objects, Methods, Properties and also their hierarchy - AutoCAD Object Model you can to find in ActiveX and VBA Reference inside Developer Help (in VBA sintax of course but it all works in lisp also).

 

Use Delete method to rease your line:

 

Command: (vla-Delete vlaEnt)
nil

Link to comment
Share on other sites

Foget to say. VLA- functions is all VBA properties and methods. VLAX- functions hasn't VBA alalogs. VLR- functions (reactors) works similar VBA Events but has absolutely other syntax and rules of usage.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...