Using iLogic to change dimension styles on drawing: Round 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In reference to this topic.
I have been using this for a little bit and I've come across a little issue. When I change from a metric to an imperial border it doesnt change what the new dimensions are when placed.
There is also an issue of having two different styles of dimension
I have another dimension style that I Use for elevations called "Elevations (US)" and "Elevations (metric)" When i put those styles on a drawing the rule threw this error:
Error in rule: Template Selection, in document: StormKing General Arrangement.dwg
Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.GeneralDimension'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{EE21CD75-39FD-4683-BE24-BFBB9CA66EB4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
The info tab is this:
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.GeneralDimension'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{EE21CD75-39FD-4683-BE24-BFBB9CA66EB4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
I have confirmed that if I take the different dimension style off of the drawing it stop having the error. Like the regular dimension styles there is a us and metric version so those need to be switched when the units are switched also. A single drawing can have both styles. Do you have any suggestions on how to fix this?