- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a sheet metal template that uses custom iproperties to figure out the length and width of the flat pattern on the piece of sheet metal. I use <sheet metal length> and <sheet metal width>. I am trying to get these custom iproperties to show up in the user parameters. Does anyone have any idea of how to do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello sreed,
iLogic will help you
SheetMetalLength = iProperties.Value("Custom", "sheet metal length")
SheetMetalWidth = iProperties.Value("Custom", "sheet metal width")Here 'SheetMetalLength' and 'SheetMetalWidth' are user parameters.
Keep mind that the change of custom iProperty cannot invoke the rule.
So you should invoke this rule manually when the iProperty has been changed, and set this rule to the trigger, such as 'Before Save Document', to minimize the risk of forgetting to invoke the rule.
(Does anyone know a better way?)
=====
Freeradical
Hideo Yamada
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I receive an error when I try to run the rule that states
"Conversion from string "14.000 in" to type 'Double ' is not valid"
The 14.000 in is my length.
How do I convert the "in"
Any help is appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Change the code as follows :
ThisDoc.Document.ComponentDefinition.Parameters.UserParameters("SheetMetalLength").Expression = iProperties.Value("Custom", "sheet metal length")
ThisDoc.Document.ComponentDefinition.Parameters.UserParameters("SheetMetalWidth").Expression = iProperties.Value("Custom", "sheet metal width")This will work even if the custom iProperty contains unit.
=====
Freeradical
Hideo Yamada