Did you write the rule, or is it from somebody else?
You only posted a small sample of the rule, right? Can you post the complete rule, maybe as a text file?
If you click Control-A in the rule editor, it will select all text. Then you can cut and paste it to Notepad, save it, and attach the file here.
But the rule probably depends on something in the drawing. So the best thing would be to attach the drawing file (Inventor 2011 version) and any linked assembly and part files (maybe using Pack and Go).
It will work in Inventor 2012 if you add the line:
to the end of your Zones rule (after the End If).
What is the error you're getting? If there is a message, can you post it here?
On my system, it wasn't updating the text on the sheet border. But adding the Update line fixed it.
Error in rule: Zones, in document: GM Drawing.idw
Conversion from string "-" to type 'Double' is not valid.
System.InvalidCastException: Conversion from string "-" to type 'Double' is not valid. ---> System.FormatException: Input string was not in a correct format.
--- End of inner exception stack trace ---
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
It looks like your SheetNo property is set to - (dash)
Your rule can only handle SheetNo as a number. What do you want to set the zone numbers to if SheetNo is a dash? To leave the zone numbers unchanged, add this line to the top of your rule:
If iProperties.Value("Custom", "SheetNo") = "-" Then Return
If this doesn't work, please send me the latest Inventor 2012 version of your drawing.
I have a simlilar issue with iLogic trying to retreive a date from an excel spreadsheet but it keeps returning the number and not as the date. How do I change the number back to the date?
I have the excel populating custom fields in the iProperties, all other work well but this is the only one that keeps defaulting the cell type from text to number everytime.
I try and change everything to text, even in the excel sheet but this always comes back to a number in the iproperties and displays the number.
Here is the line in the iLogic rule:
iProperties.Value("Custom", "REV_A/1_DATE") = GoExcel.CurrentRowValue("REV_A/1_DATE")
Do you have any suggestions on how I would rectify this problem?
The function DateTime.FromOADate will get the date:
iProperties.Value("Custom", "REV_A/1_DATE") = DateTime.FromOADate(GoExcel.CurrentRowValue("REV_A