<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iLogic - model or reference parameter in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3873279#M131403</link>
    <description>&lt;P&gt;Hi &amp;nbsp;fsanchou,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe I'm still not understanding what you're attempting to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The previous examples will change d0 to a driven dimension regardless of what the value of that dimension is. Are you needing to know or change the value of d0 also?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I'm not sure why we need the index number when we already know the name of the parameter. Is the name likely to change?, or are you changing it programmatically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A target="_blank" href="http://inventortrenches.blogspot.com" rel="nofollow"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2013 18:07:25 GMT</pubDate>
    <dc:creator>Curtis_W</dc:creator>
    <dc:date>2013-04-16T18:07:25Z</dc:date>
    <item>
      <title>iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3863022#M131396</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I wish I&lt;/SPAN&gt; &lt;SPAN&gt;perform&lt;/SPAN&gt; &lt;SPAN&gt;the following code with&lt;/SPAN&gt; &lt;SPAN&gt;iLogic&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it&lt;/SPAN&gt; &lt;SPAN&gt;possible&lt;/SPAN&gt; &lt;SPAN&gt;to change a model parameter to a reference parameter?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;If My_Expression Then

' My dimension "d0" is a Driven Dimension
' or
' My dimension "d0" is a Reference Parameter

Else

' My dimension "d0" is NOT a Driven Dimension
' or
' My dimension "d0" is a Model Parameter

End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 15:09:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3863022#M131396</guid>
      <dc:creator>fsanchou</dc:creator>
      <dc:date>2013-04-12T15:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3863092#M131397</link>
      <description>&lt;P&gt;Hi fsanchou,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are a couple of examples. The first one gets input from the user:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;MyQuestion = MessageBox.Show("Should d0 be Driven? ", "iLogic", MessageBoxButtons.YesNo)

'get the sketch to work with
oSketch = ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1")

If MyQuestion = vbYes Then
oSketch.DimensionConstraints.Item(d0).Driven = True 
Else
oSketch.DimensionConstraints.Item(d0).Driven = False
End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This one simply toggles the driven state:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'get the sketch to work with
oSketch = ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1")
'toggle from/to driven/driving
If oSketch.DimensionConstraints.Item(d0).Driven = True Then
oSketch.DimensionConstraints.Item(d0).Driven = False
Else
oSketch.DimensionConstraints.Item(d0).Driven = True
End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A target="_blank" href="http://inventortrenches.blogspot.com"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 15:45:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3863092#M131397</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2013-04-12T15:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3863404#M131398</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Curtis,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt; &lt;SPAN&gt;solves&lt;/SPAN&gt; &lt;SPAN&gt;exactly&lt;/SPAN&gt; &lt;SPAN&gt;my problem.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;You are&lt;/SPAN&gt; &lt;SPAN&gt;still effective&lt;/SPAN&gt;&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 19:13:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3863404#M131398</guid>
      <dc:creator>fsanchou</dc:creator>
      <dc:date>2013-04-12T19:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3871579#M131399</link>
      <description>&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I answered&lt;/SPAN&gt; &lt;SPAN&gt;a little too quickly&lt;/SPAN&gt; &lt;SPAN&gt;without testing&lt;/SPAN&gt; &lt;SPAN&gt;your&lt;/SPAN&gt; &lt;SPAN&gt;code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried&lt;/SPAN&gt; &lt;SPAN&gt;the following code&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1").DimensionConstraints.Item("d0").Driven = True&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;I get&lt;/SPAN&gt; &lt;SPAN&gt;the following error:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;System.Runtime.InteropServices.COMException (0x80020005): Le type ne correspond pas. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at LmiRuleScript.Main()&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the API Help &lt;SPAN&gt;&lt;SPAN&gt;I&lt;/SPAN&gt; &lt;SPAN&gt;found this information&lt;/SPAN&gt;&lt;/SPAN&gt; :&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DimensionConstraints.&lt;STRONG&gt;Item&lt;/STRONG&gt;( &lt;STRONG&gt;&lt;EM&gt;Index&lt;/EM&gt;&lt;/STRONG&gt;As Long ) As DimensionConstraint&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Description&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Index&lt;/TD&gt;&lt;TD&gt;Input Long value that specifies the index of the object to return.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;I&lt;/SPAN&gt; &lt;SPAN&gt;have not found&lt;/SPAN&gt; &lt;SPAN&gt;how to find&lt;/SPAN&gt; &lt;SPAN&gt;the dimension's index.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Do you have a&lt;/SPAN&gt; &lt;SPAN&gt;further response &lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 09:02:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3871579#M131399</guid>
      <dc:creator>fsanchou</dc:creator>
      <dc:date>2013-04-15T09:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3872973#M131400</link>
      <description>&lt;P&gt;Hi &amp;nbsp;fsanchou,&lt;/P&gt;&lt;P&gt;If you remove your dimension name from the quotes does it work then?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1").DimensionConstraints.Item(&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;"d0"&lt;/FONT&gt;&lt;/STRONG&gt;).Driven = True&lt;/PRE&gt;&lt;P&gt;I think you want this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1").DimensionConstraints.Item(&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;d0&lt;/FONT&gt;&lt;/STRONG&gt;).Driven = True&lt;/PRE&gt;&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 14:15:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3872973#M131400</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2013-04-16T14:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3873229#M131401</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Hi Curtis,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks for your help,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I also&lt;/SPAN&gt; &lt;SPAN&gt;tested this&lt;/SPAN&gt; &lt;SPAN&gt;solution&lt;/SPAN&gt; &lt;SPAN&gt;but&lt;/SPAN&gt; &lt;SPAN&gt;it does not work&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;d0 return the value of parameter&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"d0" is a string&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think I need to find the ID (as long) of the dimension ...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 17:24:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3873229#M131401</guid>
      <dc:creator>fsanchou</dc:creator>
      <dc:date>2013-04-16T17:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3873279#M131403</link>
      <description>&lt;P&gt;Hi &amp;nbsp;fsanchou,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe I'm still not understanding what you're attempting to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The previous examples will change d0 to a driven dimension regardless of what the value of that dimension is. Are you needing to know or change the value of d0 also?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I'm not sure why we need the index number when we already know the name of the parameter. Is the name likely to change?, or are you changing it programmatically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A target="_blank" href="http://inventortrenches.blogspot.com" rel="nofollow"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 18:07:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3873279#M131403</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2013-04-16T18:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3874639#M131404</link>
      <description>&lt;P&gt;Hi Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I am looking&lt;/SPAN&gt; &lt;SPAN&gt;to do&lt;/SPAN&gt; &lt;SPAN&gt;exactly&lt;/SPAN&gt; &lt;SPAN&gt;this code&lt;/SPAN&gt;&lt;/SPAN&gt;:&lt;/P&gt;&lt;PRE&gt;'get the sketch to work with
oSketch = ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1")

'toggle from/to driven/driving
If oSketch.DimensionConstraints.Item(d0).Driven = True Then
oSketch.DimensionConstraints.Item(d0).Driven = False
Else
oSketch.DimensionConstraints.Item(d0).Driven = True
End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;To do that:&lt;/P&gt;&lt;P&gt;&lt;IMG border="0" align="middle" title="4.jpg" alt="4.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/50943iF80724DF9FCF7C3E/image-size/medium?v=mpbl-1&amp;amp;px=-1" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have this error:&lt;/P&gt;&lt;P&gt;&lt;IMG border="0" align="middle" title="3.jpg" alt="3.jpg" src="https://forums.autodesk.com/t5/image/serverpage/image-id/50942i1850EF8E8A237CED/image-size/medium?v=mpbl-1&amp;amp;px=-1" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the part1.ipt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 22:06:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3874639#M131404</guid>
      <dc:creator>fsanchou</dc:creator>
      <dc:date>2013-04-17T22:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3876894#M131405</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'get the sketch to work with
oSketch = ThisDoc.Document.ComponentDefinition.Sketches.Item("Sketch1")

'toggle from/to driven/driving
Dim i As Long
For i = 1 To oSketch.DimensionConstraints.Count 
	If oSketch.DimensionConstraints.Item(i).Parameter.Name = "d0" Then
		If oSketch.DimensionConstraints.Item(i).Driven = True Then
		oSketch.DimensionConstraints.Item(i).Driven = False
		Else
		oSketch.DimensionConstraints.Item(i).Driven = True
		End If
	End If
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Curtis,&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2013 09:21:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3876894#M131405</guid>
      <dc:creator>fsanchou</dc:creator>
      <dc:date>2013-04-20T09:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3899327#M131406</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this code can help me too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i copy and paste it but it giving me error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rule Compile Errors in Rule0, in Part3&lt;/P&gt;&lt;P&gt;Error on Line 7 : End of statement expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i dont understand&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 13:12:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3899327#M131406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-30T13:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3899507#M131407</link>
      <description>&lt;P&gt;akosi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last script posted works for me as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Post a screenshot of your iLogic Rule.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 15:19:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3899507#M131407</guid>
      <dc:creator>jdkriek</dc:creator>
      <dc:date>2013-04-30T15:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3899555#M131408</link>
      <description>&lt;P&gt;thanks for immediate response guys...&lt;/P&gt;&lt;P&gt;ive attached a screen shot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;inventor 2011&lt;/P&gt;&lt;P&gt;\vault pro 2012&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 15:46:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/3899555#M131408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-30T15:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/4871474#M131409</link>
      <description>&lt;P&gt;Was there ever an answer to the line 7 error?&lt;/P&gt;&lt;P&gt;I have a need for this code, but I'm getting the same error as above, "line 7".&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 19:07:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/4871474#M131409</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-07T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/4871956#M131410</link>
      <description>&lt;P&gt;Rule is working good.&lt;/P&gt;&lt;P&gt;Check parameter to match&amp;nbsp;and sketch# to match. No problem here&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 21:04:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/4871956#M131410</guid>
      <dc:creator>GosponZ</dc:creator>
      <dc:date>2014-03-07T21:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic - model or reference parameter</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/5181265#M131411</link>
      <description>&lt;P&gt;Hi akosi,&lt;/P&gt;&lt;P&gt;You probably have already figured this out considering how long ago this post was.&lt;/P&gt;&lt;P&gt;But for your information this used to catch me out alot when copying &amp;amp; pasting ilogic code (Please see below)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.jpg" border="0" src="https://forums.autodesk.com/t5/image/serverpage/image-id/114685i78CE3C6C109A6D5B/image-size/original?v=mpbl-1&amp;amp;px=-1" align="center" title="Untitled.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Firstly as already mentioned make sure your sketch name matches the sketch you are querying.&lt;/P&gt;&lt;P&gt;Secondly always make sure you re-type the API words (purple words) when copying &amp;amp; pasting sometimes these words don't link/interface with the code.&lt;/P&gt;&lt;P&gt;Hope this helps for any future code writing&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2014 05:08:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-model-or-reference-parameter/m-p/5181265#M131411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-29T05:08:59Z</dc:date>
    </item>
  </channel>
</rss>

