Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Lisp not working with 64bit stations
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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.
Re: Lisp not working with 64bit stations
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Without even taking a look the problem is with the object id .
Tharwat
Re: Lisp not working with 64bit stations
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: Lisp not working with 64bit stations
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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))
)
)
Re: Lisp not working with 64bit stations
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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)
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
Re: Lisp not working with 64bit stations
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
