2. So (vlax-invoke) does accept points-as-lists in AC. Whereas (vla-...) and (vlax-invoke-method) don't.
Correct, to my knowledge, the undocumented
vlax-invoke /
vlax-get functions are a remnant of Vital LISP, and will accept native LISP data types, so that you can avoid manipulation of variants / safearrays (though, admittedly in this case it would be a simple use of
vlax-3D-point)
3. I never use (eq) when comparing strings or numbers. There have been discussions on this before. My view is that (eq) has a very special meaning and I never use it instead of (=).
Using (eq) would make more sense to me here:
Good point, I agree 'eq' is more suited to comparing variables over strings / numbers, as it compares the variable pointers rather than the values themselves (i.e. whether the variables point to the same data). Though habitually, I do tend to reserve '=' for numerical comparison, even though it could equally (excuse the pun) be used with strings. Whereas
equal is more suited to list comparison.
4. I think your modifications to the (entlast) check are unnecessary considering the program has just created a block with a unique name.
I agree, with the addition of the
entlast check, the name comparison becomes superfluous since the newly created entity can only be the block.
Given the above discussions, here is an updated program:
(defun c:alttext
( / b i n o s
) 'add '(0.0 0.0 0.0) n
)
)
(command "_.-insert" n
"_S" 1.0 "_R" 0.0 pause
) )
)
)
)
)