I am trying to use my sheet metal rules to drive my part numbers and titles in iproperties. I am using inventor 2012. please look at my code and see if I am missing anything. This code has worked in the past but since the Inventor Service Pack 3 installed SOME of our code has stopped working, specifically gaskets.
Solved! Go to Solution.
Where does "currentStyle" come from? If what you're showing is all of the code you have, then currentStyle will always equal nothing, as it's not recieving a value. Is it supposed to be a parameter? If so, then I can see by it's color that it's no longer in the file. (parameters are blue)
Hi and welcome to the forum!
Can you post a part that uses this rule? Just from the code you posted, it's impossible to tell what might be wrong. There is nothing wrong with the code itself, except it is unclear what your intent is with the variable called currentStyle. Is this a parameter, or a variable from somewhere else in the code?
I set up a part with a text user parameter called currentStyle, and set the value to be "GASKET 1 1/2", and this code works without errors. So there is something else going on outside of the code that is causing errors.
"currentStyle" should be retrieving "GASKET 1 1/2" from the "sheet metal rule". At least this is what I thought was happening. I basically would like my code to look at the style under the "Sheet Metal Rule" box and fill my part number and title accordingly in the iproperties. Please let me know if the image is too small to see I can't tell from here.
Thanks for the quick reply. No, it is not a parameter. It is a style that I custom created. I thought "currentStyle" would retrieve any style from the "Sheet Metal Rule" dialog.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register