Curtis,
I answered a little too quickly without testing your code.
I tried the following code:
ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1").DimensionConstraints.Item("d0").Driven = True
I get the following error:
System.Runtime.InteropServices.COMException (0x80020005): Le type ne correspond pas. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
In the API Help I found this information :
DimensionConstraints.Item( IndexAs Long ) As DimensionConstraint
Name | Description |
Index | Input Long value that specifies the index of the object to return. |
I have not found how to find the dimension's index.
Do you have a further response ?
Thanks