Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lisp not working with 64bit stations

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
LightingDesignAlliance
624 Views, 5 Replies

Lisp not working with 64bit stations

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

Tags (1)
5 REPLIES 5
Message 2 of 6

Without even taking a look the problem is with the object id .

 

Tharwat

 

 

Message 3 of 6

Can you tell ne how to fix, I am a lisp novice.
Message 4 of 6

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))
  )
)

 

Message 5 of 6

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)

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
Message 6 of 6

I added both to the lisp and I am now getting the correct data returned on my fields. Thank you both so much for the help. -Jason

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost