Document properties, elements, and LIP
Posted: Thu Jul 26, 2012 2:18 pm
Recently I've been exploring LIP to automate a few functions in TopSolid. I had some success with exporting a bill of materials to excel thanks to topics on this forum.
Now I'm trying to get the values of document properties as variables in LIP.
For example: File->Properties->General shows a view and a count of elements like $AUTHOR and $CREATION_DATE
Looking at the LIP documentation (out of date as it is) I see functions for GetElementName
and
GetElementDesignation
and with these two I can put a label like (2,1) on the stack and get the name of the elements above ($AUTHOR) or the designation (AUTHOR)
but theres nothing about getting element values or document properties. I tried a few obvious ones like GetElementValue but no luck.
Here is my code so far (very simple, just testing whether I can retrieve the value and print it)
Has anyone else tried to do this? Suggestions?
Now I'm trying to get the values of document properties as variables in LIP.
For example: File->Properties->General shows a view and a count of elements like $AUTHOR and $CREATION_DATE
Looking at the LIP documentation (out of date as it is) I see functions for GetElementName
and
GetElementDesignation
and with these two I can put a label like (2,1) on the stack and get the name of the elements above ($AUTHOR) or the designation (AUTHOR)
but theres nothing about getting element values or document properties. I tried a few obvious ones like GetElementValue but no luck.
Here is my code so far (very simple, just testing whether I can retrieve the value and print it)
Code: Select all
1 2 BuildLabelFromIdentifiers GetElementName
PrintS
QuitMacro