View Single Post
  #2  
Old 09-08-2014, 06:45 AM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: Multi language mass table

Quote:
Originally Posted by papadam View Post
Hello,
I came across http://www.cocreateusers.org/forum/showthread.php?t=5234 but I would like to have the first row only in different languages.

I tried to something like this:
Code:
:contents  '(((sd-multi-lang-string "Acrylic" :german "Plexiglas")   0.043 "1.190")
What happens is in my display table I get the string "(sd-multi-lang-string "Acrylic" :german "Plexiglas")" instead of only "Plexiglas". What's wrong?

I am using Direct Modeling v17 but I think the Version does not matter much here.
Hi,

The issue is that the sd-multi-lang-string function needs to be evaluated when populating the field. There are a couple of ways you can do this.

The first is just to use the list function rather than a quoted list, something like this:
Code:
:contents  (list (list (sd-multi-lang-string "Acrylic" :german "Plexiglas")   0.043 "1.190") ....  )
The second is to use a backquote and comma (which evaluates the immediately following function), something like this:
Code:
:contents  `((,(sd-multi-lang-string "Acrylic" :german "Plexiglas")   0.043 "1.190   .... )")
The code above is not tested, but the ideas should be accurate. Note that using the (list ...) function cannot always be used in place of a quoted list, but frequently works.

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