Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

vle-entget-m syntax

I've been trying to use vle-entget-m but it is erroring. I am using the following:

(vle-entget-m '((10 . new_center)(40 . new_radius)(50 . angle1)(51 . angle2)) old_arc)

I get this error message:

; ----- Error around expression -----
; '((10 . NEW_CENTER) (40 . NEW_RADIUS) (50 . ANGLE1) (51 . ANGLE2))
Error: bad argument type <(10 . NEW_CENTER)> ; expected at [vle-entget-m]

Any direction on how to properly format this line would be appreciated.


  • Dear Martin,

    best, to have a look in recent "Lisp Developer Support Package" :-)
    It is documented there ....

    just an example :
    (vle-entget-m '(8 62 39) entity)
    returns '((8 . "LayerX")(62 . 4)(39 . 0.0))

    Or do you mean (vle-entmod-m) ?

    (vle-entmod-m '((8 . "LayerX") (62 . 112) (39 . 2.0)) entity)
    sets the layer to "LayerX"
    sets the ACI colour index as 112
    sets the elevation as 2.0

    hope thi sclarifies a bit ?
    Merry Christmas :-)

  • Torsten,

    Merry Christmas!

    Yes, I meant (vle-entmod-m).

    When I compare the line I posted (with vle-entget-m changed to vle-entmod-m) to the sample in the developer reference I see no problem with the syntax. The only difference I see is that I am passing variables rather than passing constants. If I split this into four vle-entmod commands the four commands work properly.

  • You are quoting the list. Therefore the variables are not evaluated.

  • Thanks, Roy.

    This works: (vle-entmod-m (list (cons 10 new_center)(cons 40 new_radius)(cons 50 angle1)(cons 51 angle2)) old_arc)

    Perhaps it might be good if the LDSP example was updated to include a handling a variable.

  • Dear Roy - thanks for the hints, indeed I overlooked that detail :-)

    Dear Martin,

    but that notation is standard Lisp anyway - if quoted, then plain values are taken, if variables are used in list construction, then the (list) or (cons) functions must be used (as Roy mentioned) ... same as for (entmod) anyway :-)

    but yes, I will update the samples in LDSP ... from time to time, I make that same mistake myself :-)

    have a great time everyone !

  • Thanks, Torsten.

    I don't do much programming anymore and it is easy to forget even basic syntax.

Sign In or Register to comment.
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam