<?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: How to get Parameter's unit in C#.Net in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10590985#M125206</link>
    <description>&lt;P&gt;I had the same issue today. I write the fix for C# users. See my GitHub for more info.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/CSmichaelnavara/Inventor-Parameter-Units-Fix" target="_blank"&gt;https://github.com/CSmichaelnavara/Inventor-Parameter-Units-Fix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 16:02:48 GMT</pubDate>
    <dc:creator>Michael.Navara</dc:creator>
    <dc:date>2021-09-01T16:02:48Z</dc:date>
    <item>
      <title>How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/4939786#M125197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get Parameters value and Units using C#.net.&lt;/P&gt;&lt;P&gt;It is working through VBA and .net.But while i am using C#.net, it is showing meassage that "It is not support by the Langauage".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can any one suggets m eto get Unit fo Patrameter using C#.net.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*********Code&lt;/P&gt;&lt;P&gt;foreach (Parameter oParam in oParams)&lt;BR /&gt;{&lt;BR /&gt;// string Str = oParam.Units; //Getting error in this line&lt;BR /&gt;Tlist.Add(oParam.Name + "|" + Convert.ToString(oParam.Expression) + "|" +"in");//oParam.Units&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Appadurai.G&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 12:18:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/4939786#M125197</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-07T12:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/4940468#M125198</link>
      <description>&lt;P&gt;In C# I've had to use the get_Units() method instead of the Units property. For some reason the units property can never be found.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;string units = oParam.get_Units();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2014 15:36:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/4940468#M125198</guid>
      <dc:creator>rjay75</dc:creator>
      <dc:date>2014-04-07T15:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/4942200#M125199</link>
      <description>&lt;P&gt;Also by the way, the Expression property is always a string.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 07:20:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/4942200#M125199</guid>
      <dc:creator>rjay75</dc:creator>
      <dc:date>2014-04-08T07:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/4942218#M125200</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Rodney ,&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;Thanks for your Support.&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;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Appadurai.G&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2014 07:27:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/4942218#M125200</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-08T07:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/9039496#M125201</link>
      <description>&lt;P&gt;Hi Rodney,&lt;/P&gt;&lt;P&gt;I get a 'member not found' exception at runtime when I use Parameter.get_Units(); in C#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Inventor 2019.4. Any ideas?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2019 17:58:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/9039496#M125201</guid>
      <dc:creator>LukeDavenport</dc:creator>
      <dc:date>2019-09-22T17:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/9213441#M125202</link>
      <description>&lt;P&gt;Hi Luke,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you set the reference Autodesk.Inventor.Interop's "Embed Interop Types" to False? Make sure to set this property to False always when you use Inventor API in C#/VB.net, otherwise it may impact some events/methods.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 07:02:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/9213441#M125202</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2019-12-20T07:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/9213772#M125203</link>
      <description>&lt;P&gt;Thanks for the reply. This didn't solve the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the end I couldn't get the parameter units using C# despite trying a few different methods, so I had to include some VB code in my C# solution to get the units!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Full solution was as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) In Visual Studio, create a new &lt;STRONG&gt;VB.net&lt;/STRONG&gt; Project (of type Class Library) and add it to the existing C# solution.&lt;/P&gt;&lt;P&gt;2) Add a function to the VB.net class which receives a parameter and returns the unit string.&lt;/P&gt;&lt;P&gt;3) Build the VB.net project.&lt;/P&gt;&lt;P&gt;4) Add a reference to the VB.net project dll to the top of your C# project.&lt;/P&gt;&lt;P&gt;5) Use the VB.net GetParameterUnits function whenever you need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked fine for me.&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 10:50:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/9213772#M125203</guid>
      <dc:creator>LukeDavenport</dc:creator>
      <dc:date>2019-12-20T10:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10072470#M125204</link>
      <description>&lt;P&gt;Did you recompile after setting &lt;STRONG&gt;Embed Interop Types&lt;/STRONG&gt; to &lt;STRONG&gt;False&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;For me too that got rid of the error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition, you could also use a &lt;STRONG&gt;dynamic&lt;/STRONG&gt; variable to access the property using &lt;STRONG&gt;late-binding&lt;/STRONG&gt; as your &lt;STRONG&gt;VB&lt;/STRONG&gt;&amp;nbsp;project does:&lt;BR /&gt;&lt;A href="https://modthemachine.typepad.com/my_weblog/2021/02/member-not-found-error-in-c-add-in.html" target="_blank"&gt;https://modthemachine.typepad.com/my_weblog/2021/02/member-not-found-error-in-c-add-in.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 13:05:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10072470#M125204</guid>
      <dc:creator>adam.nagy</dc:creator>
      <dc:date>2021-02-10T13:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10317456#M125205</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/82872"&gt;@rjay75&lt;/a&gt;does get_Units still work for you? When I try it (Inventor 2019) it crashes....&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 07:32:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10317456#M125205</guid>
      <dc:creator>oransen</dc:creator>
      <dc:date>2021-05-17T07:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10590985#M125206</link>
      <description>&lt;P&gt;I had the same issue today. I write the fix for C# users. See my GitHub for more info.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/CSmichaelnavara/Inventor-Parameter-Units-Fix" target="_blank"&gt;https://github.com/CSmichaelnavara/Inventor-Parameter-Units-Fix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 16:02:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10590985#M125206</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2021-09-01T16:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter's unit in C#.Net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10833757#M125207</link>
      <description>&lt;P&gt;I am converting vb.net code into c# and face this issue.&lt;/P&gt;&lt;P&gt;Changing dll property gives lots of errors so that is "No-Go" for me.&lt;/P&gt;&lt;P&gt;Adam's reply work for me.&lt;/P&gt;&lt;P&gt;Specially&amp;nbsp;&lt;A href="https://modthemachine.typepad.com/my_weblog/2021/02/member-not-found-error-in-c-add-in.html" target="_blank" rel="noopener"&gt;this article's&lt;/A&gt; final solution of using 'dynamic' object works perfectly.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 14:36:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-get-parameter-s-unit-in-c-net/m-p/10833757#M125207</guid>
      <dc:creator>Prashant.Baher</dc:creator>
      <dc:date>2021-12-20T14:36:45Z</dc:date>
    </item>
  </channel>
</rss>

