I have a lisp that is pulling annotations from one block and assigning them as fields in another block, seems to work fine on 32bit stations but returns #### in the fields for 64bit stations.
Thanks in advance
Solved! Go to Solution.
Solved by Shneuph. Go to Solution.
Solved by _Tharwat. Go to Solution.
Without even taking a look the problem is with the object id .
Tharwat
Add the following codes by Gile to your codes to get the ObjectID .
(defun gc:GetObjectIdString ( obj ) (or *util* (setq *util* (vla-get-Utility (vla-get-ActiveDocument (vlax-get-acad-object))))) (if (vlax-method-applicable-p *util* 'GetObjectIdString) (vla-GetObjectIdString *util* obj :vlax-false) (itoa (vla-get-ObjectId obj)) ) )
The Code you posted has (rtos objID 2 0). Is the object ID ever a real? I think it's integer..
Try switching:
(setq
obj (vlax-ename->vla-object ent)
objID (vla-get-objectid obj)
str (strcat "%<\\AcObjProp Object(%<\\_ObjId "(rtos objID 2 0)">%).TextString \\f \"%tc1\">%")
)
in your code to:
(setq
obj (vlax-ename->vla-object ent)
objID (vla-get-objectid obj)
str (strcat "%<\\AcObjProp Object(%<\\_ObjId "(itoa objID)">%).TextString \\f \"%tc1\">%")
)
I don't have a 64bit sys to test on..
Next step would be to make the field manually on the 64 bit system and then check the string to make sure what you have in your lisp matches it I would think.
Then you may have to use a different value for 'str depending on if the system is 32 or 64 bit (if possible)