Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/18/2020 in all areas

  1. You need to have the list of coordinates with decimal numbers. eg : (list 0.0 0.0 0.0) or '(0.0 0.0 0.0)
    1 point
  2. vla-put-insertionpoint uses early binding meaning that access to the property is defined by the Type Library for the AutoCAD ActiveX Component Object Model (COM), whereas vlax-put-property or the undocumented vlax-put function uses late binding, meaning that access to the property is resolved at run-time. The difference between the late-bound functions vlax-put-property and vlax-put is simply that vlax-put will accept native Vanilla AutoLISP data types, thereby allowing you to supply lists of doubles in place of a safearray variant used by vlax-put-property, however, I've experienced issues in the past when using vlax-put with some properties and so tend to opt for vlax-put-property where possible. The differences between early & late binding become more apparent when interfacing with objects outside of the AutoCAD Object Model, for example, such as the Excel Object Model. Here, unless you import the relevant Type Library to define the properties & methods of objects within the Object Model, you will not be able to access properties or invoke methods using the early-bound vla-get-*/vla-put-* or vla-* functions respectively, but only by referencing the property or method by name using the late-bound vlax-get-property/vlax-put-property or vlax-invoke-method functions (or the equivalent undocumented vlax-get/vlax-put & vlax-invoke functions). In terms of performance, since AutoLISP is interpreted at run-time, you'll only take advantage of the performance benefits of early binding if you compile & optimise your program, and even then, the differences are close to negligible.
    1 point
  3. To be pedantic one is a vla function and the other is a vlax function As @Tharwat mentions the vla function requires the point as a variant thus (vlax-3d-point (list 0 0 0)) whilst the vlax just the list (list 0 0 0). The vlax is therefore slightly quicker as it doesn't require the point to be converted. Conversely the (vla-get-insertionpoint) function will return a variant which must be converted to a list whilst the vlax-get returns a list. However take care when using on properties that return boolean property values, using (vla-get-closed obj) or (vlax-get-property obj 'closed) on a polyline will return :vlax-true or :vlax-false whilst vlax-get obj 'closed will return -1 or 0
    1 point
  4. vla-put-insertionpoint requires a variant input as a list of coordinates but the vlax-put does not require a variant, but a list of coordinates only.
    1 point
×
×
  • Create New...