<?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 How do I check if a parameter exists? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12571453#M163969</link>
    <description>&lt;P&gt;As goes the title, I have tried to mimic the shared version:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;SharedVariable&lt;/SPAN&gt;.&lt;SPAN&gt;Exists&lt;/SPAN&gt;(&lt;SPAN&gt;"VariableName"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;by doing this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Parameter&lt;/SPAN&gt;.&lt;SPAN&gt;Exists&lt;/SPAN&gt;(&lt;SPAN&gt;Connection&lt;/SPAN&gt;, &lt;SPAN&gt;"Hex_AFc"&lt;/SPAN&gt;) Then
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter exists"&lt;/SPAN&gt;)
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter does not exist"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;but that doesn't work. The best I've managed is a try catch:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;Connection&lt;/SPAN&gt;, &lt;SPAN&gt;"Hex_AFc"&lt;/SPAN&gt;)
		&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter exists"&lt;/SPAN&gt;)
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter does not exist"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;but it's not very slick. Is there a better way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Harvey&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2024 15:07:23 GMT</pubDate>
    <dc:creator>harvey_craig2RCUH</dc:creator>
    <dc:date>2024-02-20T15:07:23Z</dc:date>
    <item>
      <title>How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12571453#M163969</link>
      <description>&lt;P&gt;As goes the title, I have tried to mimic the shared version:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;SharedVariable&lt;/SPAN&gt;.&lt;SPAN&gt;Exists&lt;/SPAN&gt;(&lt;SPAN&gt;"VariableName"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;by doing this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Parameter&lt;/SPAN&gt;.&lt;SPAN&gt;Exists&lt;/SPAN&gt;(&lt;SPAN&gt;Connection&lt;/SPAN&gt;, &lt;SPAN&gt;"Hex_AFc"&lt;/SPAN&gt;) Then
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter exists"&lt;/SPAN&gt;)
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter does not exist"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;but that doesn't work. The best I've managed is a try catch:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;Connection&lt;/SPAN&gt;, &lt;SPAN&gt;"Hex_AFc"&lt;/SPAN&gt;)
		&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter exists"&lt;/SPAN&gt;)
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter does not exist"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;but it's not very slick. Is there a better way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Harvey&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 15:07:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12571453#M163969</guid>
      <dc:creator>harvey_craig2RCUH</dc:creator>
      <dc:date>2024-02-20T15:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12571992#M163986</link>
      <description>&lt;P&gt;If you are willing to use the Inventor API (in an Ilogic rule) then you could try something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim doc As PartDocument = ThisApplication.ActiveDocument
Dim def As PartComponentDefinition = doc.ComponentDefinition

Dim parameters = def.Parameters.Cast(Of Parameter)

Dim exsits = parameters.Any(Function(p) p.Name.Equals("test1"))

If exsits Then
	MsgBox("Parameter exist")
End If&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 19:23:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12571992#M163986</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2024-02-20T19:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12910132#M169763</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I got an error message:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ngnam1988_0-1721533834823.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1389171iFFAAD695406BBFFC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ngnam1988_0-1721533834823.png" alt="ngnam1988_0-1721533834823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could you please help me? Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2024 03:50:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12910132#M169763</guid>
      <dc:creator>ngnam1988</dc:creator>
      <dc:date>2024-07-21T03:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12910229#M169764</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I’m on holiday and don’t have a computer here. But just 2 quick points. Are you running inventor 2025? It has some late binding issues.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this code (as it is) only works on part.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2024 06:38:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12910229#M169764</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2024-07-21T06:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12912050#M169777</link>
      <description>&lt;P&gt;good monring,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the code i use to check if a parameter exists, it uses a loop to check a name. i've found it works well and is robust.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'set ref to active doc&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oActiveDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;

&lt;SPAN&gt;'set ref to user parameters&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oUserParams&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UserParameters&lt;/SPAN&gt; = &lt;SPAN&gt;oActiveDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Parameters&lt;/SPAN&gt;.&lt;SPAN&gt;UserParameters&lt;/SPAN&gt;
&lt;SPAN&gt;'set ref to user parameter&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oUserParam&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UserParameter&lt;/SPAN&gt;
&lt;SPAN&gt;'set ref to counter&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
&lt;SPAN&gt;i&lt;/SPAN&gt; = 1
&lt;SPAN&gt;'set up param search name&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oParamSearchName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;"TestName"&lt;/SPAN&gt;

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oUserParam&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oUserParams&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oUserParam&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;oParamSearchName&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"User Paramater - "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oParamSearchName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;" - Exist."&lt;/SPAN&gt;, &lt;SPAN&gt;vbOKOnly&lt;/SPAN&gt;, &lt;SPAN&gt;"Check User Paramaters"&lt;/SPAN&gt;)
		&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;'if count = i then param doesn't exisit trip message box&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; = &lt;SPAN&gt;oUserParams&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"User Paramater - "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oParamSearchName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;" - Does NOT Exist."&lt;/SPAN&gt;, &lt;SPAN&gt;vbOKOnly&lt;/SPAN&gt;, &lt;SPAN&gt;"Check User Paramaters"&lt;/SPAN&gt;)

	&lt;SPAN&gt;i&lt;/SPAN&gt; = &lt;SPAN&gt;i&lt;/SPAN&gt; + 1
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2024 11:57:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12912050#M169777</guid>
      <dc:creator>AndrewHumiston</dc:creator>
      <dc:date>2024-07-22T11:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12913152#M169802</link>
      <description>&lt;LI-CODE lang="general"&gt;Function ParameterExists(paramName As String) As Boolean
	
	Dim doc As Document = ThisDoc.Document
	Dim params As Parameters
	If doc.DocumentType = Inventor.DocumentTypeEnum.kDrawingDocumentObject Then
		params = doc.Parameters
	Else
		params = doc.ComponentDefinition.Parameters
	End If

	For Each p As Parameter In params
		If p.Name = paramName Then Return True
	Next p

	Return False

End Function 'ParameterExists&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can add this function to your code - it'll return True if the parameter name you give it exists in the document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 21:06:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12913152#M169802</guid>
      <dc:creator>ryan.rittenhouse</dc:creator>
      <dc:date>2024-07-22T21:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12913189#M169804</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1252980"&gt;@ngnam1988&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I typically just use a try/catch to try and set the value, and then catch the error when it does not exist and add it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keep in mind that drawings and models have the user parameter set organized a bit differently, since drawings do not contain a component definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Thisapplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;DocumentTypeenum&lt;/SPAN&gt;.&lt;SPAN&gt;kDrawingDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;oUserParams&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;Parameters&lt;/SPAN&gt;.&lt;SPAN&gt;UserParameters&lt;/SPAN&gt;
&lt;SPAN&gt;Else&lt;/SPAN&gt;
	&lt;SPAN&gt;oUserParams&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Parameters&lt;/SPAN&gt;.&lt;SPAN&gt;UserParameters&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;dValue&lt;/SPAN&gt; = 99
&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;Parameter&lt;/SPAN&gt;( &lt;SPAN&gt;"Foo"&lt;/SPAN&gt;) = &lt;SPAN&gt;dValue&lt;/SPAN&gt;
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN&gt;oParam&lt;/SPAN&gt; = &lt;SPAN&gt;oUserParams&lt;/SPAN&gt;.&lt;SPAN&gt;AddByValue&lt;/SPAN&gt;(&lt;SPAN&gt;"Foo"&lt;/SPAN&gt;, &lt;SPAN&gt;dValue&lt;/SPAN&gt;, &lt;SPAN&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kDefaultDisplayLengthUnits&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are working with assembly occurrences, then something like this will work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN&gt;Component&lt;/SPAN&gt;.&lt;SPAN&gt;InventorComponent&lt;/SPAN&gt;(&lt;SPAN&gt;"MyPart"&lt;/SPAN&gt;)
&lt;SPAN&gt;oUserParams&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Definition&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;Parameters&lt;/SPAN&gt;.&lt;SPAN&gt;UserParameters&lt;/SPAN&gt;

&lt;SPAN&gt;dValue&lt;/SPAN&gt; = 99
&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;"Foo"&lt;/SPAN&gt;) = &lt;SPAN&gt;dValue&lt;/SPAN&gt;
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN&gt;oParam&lt;/SPAN&gt; = &lt;SPAN&gt;oUserParams&lt;/SPAN&gt;.&lt;SPAN&gt;AddByValue&lt;/SPAN&gt;(&lt;SPAN&gt;"Foo"&lt;/SPAN&gt;, &lt;SPAN&gt;dValue&lt;/SPAN&gt;, &lt;SPAN&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kDefaultDisplayLengthUnits&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 21:36:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12913189#M169804</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2024-07-22T21:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12914878#M169842</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14967915"&gt;@harvey_craig2RCUH&lt;/a&gt;&amp;nbsp;wrote:&lt;PRE&gt;&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Parameter&lt;/SPAN&gt;(&lt;SPAN&gt;Connection&lt;/SPAN&gt;, &lt;SPAN&gt;"Hex_AFc"&lt;/SPAN&gt;)
		&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter exists"&lt;/SPAN&gt;)
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"this parameter does not exist"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can make this look a little better by using a single line IF-statement. You don't need an IF...End If-construction when there's not a block of code in/between it. #Just a suggestion.&lt;/P&gt;&lt;P&gt;Personally, I use a dedicated sub procedure similar to &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5993932"&gt;@ryan.rittenhouse&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 15:24:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12914878#M169842</guid>
      <dc:creator>_dscholtes_</dc:creator>
      <dc:date>2024-07-23T15:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12932568#M170104</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_Waguespack&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I'm trying another way like&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11883582"&gt;@AndrewHumiston&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5993932"&gt;@ryan.rittenhouse&lt;/a&gt;&amp;nbsp;because I'm using "On Error Resume Next" Syntax.&lt;BR /&gt;Thanks all of you!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 04:27:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12932568#M170104</guid>
      <dc:creator>ngnam1988</dc:creator>
      <dc:date>2024-08-01T04:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12932595#M170105</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I'm working on Inventor 2023. I'm trying find some new way to check existed parameters.&amp;nbsp;I'm very curious about your codes. It was really different from my previous understanding.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 04:49:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12932595#M170105</guid>
      <dc:creator>ngnam1988</dc:creator>
      <dc:date>2024-08-01T04:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check if a parameter exists?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12933348#M170126</link>
      <description>&lt;P&gt;good morning,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to caution you on using 'on error' handling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my experience it is better to solve the issue that is causing the error than to resume when an error has happened.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i will share why. the company i work for has a configurable sales CAD system that populates a model with other assemblies that are controlled by turning off/on visibility. I know terrible idea, but its been around for about 10 years, all the code is located in one rule that is approx. 1000 lines long, and uses 'on error; &amp;amp; "goto" syntax. While it seems like a good practice to get the job done, in reality it is 'lazy' coding. When you are the person coming behind code, it is tough to follow those kinds of event handlers. Its taken way to many hours to find the simplest bugs to flush out how it works and why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i hope this helps, please reach out with any questions, I don't pretend to know everything, but I will sure try to answer your question!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11883582"&gt;@AndrewHumiston&lt;/a&gt;&amp;nbsp;-&amp;nbsp;this post has been edited due to &lt;A href="https://forums.autodesk.com/t5/forum-user-guides/community-rules-and-etiquette/td-p/9581007" target="_blank"&gt;Community Rules &amp;amp; Etiquette violation&lt;/A&gt;.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 13:47:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-do-i-check-if-a-parameter-exists/m-p/12933348#M170126</guid>
      <dc:creator>AndrewHumiston</dc:creator>
      <dc:date>2024-08-01T13:47:29Z</dc:date>
    </item>
  </channel>
</rss>

