Jump to content

Help for VLA-* functions (where to find)


chavlji

Recommended Posts

Hello

I know I can search for all lisp functions in vlisp help. It has explanations for all standard lisp functions as well as vlax-* functions.

But where can I get help for vla-* functions. I know I ken get list of them using VLisp's Apropose, but there is no help provided with this list...

Link to comment
Share on other sites

It isn't AutoLISP functions but properties and methods of ActiveX objects. You can find it in ActiveX and VBA reference inside Developer Help. There syntax VBA is used, however to use them in syntax AutoLISP not difficult.

 

Draw a line and type in command line and pick line:

 

Command: (vl-load-com)
Command: (setq vObj(vlax-ename->vla-object(car(entsel))))
Select object: #<VLA-OBJECT IAcadLine 026386b4>

 

Now you have ActiveX object of your line. Look all properties and methods by mean of vlax-dump-object function:

 

Command: (vlax-dump-object vObj T)
; IAcadLine: AutoCAD Line Interface
; Property values:
;   Angle (RO) = 0.657912
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00d73d3c>
;   Delta (RO) = (584.602 451.76 0.0)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 090902a8>
;   EndPoint = (1887.85 1143.92 0.0)
;   Handle (RO) = "1AD"
;   HasExtensionDictionary (RO) = 0
;   Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0edfe97c>
;   Layer = "0"
;   Length (RO) = 738.815
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Material = "ByLayer"
;   Normal = (0.0 0.0 1.0)
;   ObjectID (RO) = 2130342760
;   ObjectName (RO) = "AcDbLine"
;   OwnerID (RO) = 2130337016
;   PlotStyleName = "ByLayer"
;   StartPoint = (1303.24 692.161 0.0)
;   Thickness = 0.0
;   TrueColor = #<VLA-OBJECT IAcadAcCmColor 0ee0de10>
;   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 ()
T

 

Now get object color:

Command: (vla-get-color vObj)
256

 

And change it to Red:

 

Command: (vla-put-Color vObj 1)
nil

 

As you see vla- functions is object properties. vla-get- serves to get properties and vla-put- to change properties.

 

Now apply Offset method to your line:

 

Command: (setq Res(vla-offset vObj -15))
#<variant 8201 ...>

 

Variable Res is variant-safearray with a new objects. Transform it to list:

 

Command: (vlax-safearray->list(vlax-variant-value Res))
(#<VLA-OBJECT IAcadLine 02638954>)

  • Like 1
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...