Thread: Add elemt info
View Single Post
  #4  
Old 12-06-2018, 01:21 PM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: Add elemt info

You are correct that the "\" causes errors in this case -- no "\" is needed.

You can certainly do this using the "ADD_ELEM_INFO ..." command, but (as you have discovered), it can be difficult to specify the object that you want to attach the info to.

Perhaps an easier way for you to do it is to use the lisp functions provided by the Annotation module. This will allow your dialog to allow the user to select an annotation item (part, line, etc) and then add the INFO to it using the command
(sd-am-add-info-attributes (list "Info 1" "Info 2" ) myobject)
or something like that. This would allow you to easily construct the info strings within your dialog and then attach them to the selected object.

Of course, if you want to use the ADD_ELEM_INFO approach, you can create that entire string using the (format ... ) command to build the string with the components you'd like, and then send that string to Annotation using the
(sd-execute-annotator-command :cmd mystring)
approach...

I hope this helps!

andy
__________________
Andy Poulsen
AI MAXTools: Dream. Design. Done. It's that easy!
Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+!
See them in action at www.ai-maxtools.com and then try them for yourself -- FREE!
Reply With Quote