I am writing a lisp program to create a multi-leader with a field linked to a CAD point position Z value, from the code attached below I can convert the entname of the selected point to an ObjID, however this ObjID does not match with the ID if I create the field by selecting the object manually. By looking at the difference of the IDs, first came to my mind was Hexadecimal to Decimal format different, but after the conversion, they are still not the same, why?
Thanks.
ObjID by lisp (see source code https://help.autodesk.com/view/OARX/2024/ITA/?guid=GUID-F0AE18DE-4E8F-48C6-8138-0AF7ECE14C49 )
Command: (setq ename-point (car (entsel "\nPick a Point:")))
Pick a Point:<Entity name: 2c997267d80>
Command: (setq vlaobject-point (vlax-ename->vla-object ename-point))
#<VLA-OBJECT IAcadPoint 000002c99d74b2c8>
Attached below is the ObjID if I insert the field by selecting the same object manually
%<\AcObjProp Object(%<\_ObjId 3064847564160>%).Coordinates \f "%lu6%pt4">%
Hexadecimal 000002c99d74b2c8 ===> Decimal 3064953352904
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
The ObjId in the field is the ObjectARX ObjectId, not the COM id. Use this to get the ObjectId:
https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-608ABDA5-D489-4DC8-B13E-643AA782B696
Thanks @Jeff_M for the advice, I found the solution https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/64-bit-object-id-problem/td-p/252705...
(itoa (vla-get-ObjectId (VLAX-ENAME->VLA-OBJECT (CAR (ENTSEL)))))
Can't find what you're looking for? Ask the community or share your knowledge.