<?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: Custom Properties and Form in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958924#M7429</link>
    <description>&lt;P&gt;This single line merges 7 lines into one.&amp;nbsp; Just wow.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As Document = ThisDoc.Document&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2024 17:49:10 GMT</pubDate>
    <dc:creator>shubham.raturi2308</dc:creator>
    <dc:date>2024-08-14T17:49:10Z</dc:date>
    <item>
      <title>Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12946261#M7415</link>
      <description>&lt;P&gt;Hello Everyone,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Initially, I have a part file without custom properties. Here's the plan:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create Custom Properties&lt;/STRONG&gt;: Define three parameters (Prop1, Prop2, Prop3) with multi-list values using iLogic. I will provide the possible values for each property.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Design a Form&lt;/STRONG&gt;: Develop a form incorporating these properties. Implement conditional logic (e.g., selecting a value for Prop1 will filter available options for Prop2, which in turn affects the choices for Prop3).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Automate iProperties Creation&lt;/STRONG&gt;: Once the form is completed and 'Export' is selected for custom parameters, it will automatically generate the necessary iProperties.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Integrate with Drawings&lt;/STRONG&gt;: Ensure that these custom properties can be referenced in the drawing without being included in the title block.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you for your attention.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Shubham Raturi&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11883582"&gt;@AndrewHumiston&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 07:20:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12946261#M7415</guid>
      <dc:creator>shubham.raturi2308</dc:creator>
      <dc:date>2024-08-08T07:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12946694#M7416</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just a few thoughts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) If you are hard coding in the values of the lists, then you may want to create a set of sub-lists based on the choice of Prop1. I.E. you don't want to filter a list based on a choice, you want to drive your choice after selecting Prop1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you think about it, choosing prop1 should then trigger another list called Prop1b, if you are trying to trigger a set of values from Prop2, the code would quickly become messy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When creating the Parameters Prop1 and so forth, you can set the export when creating the parameter, no need to add an extra step at the end of the form choosing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what do you mean by iproperties being referenced in the drawing, but not in the TB? how do you envision using the properties there?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 11:19:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12946694#M7416</guid>
      <dc:creator>AndrewHumiston</dc:creator>
      <dc:date>2024-08-08T11:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12946867#M7417</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11409245"&gt;@shubham.raturi2308&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;see the attached example, I think it'll give you some ideas on how to proceed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note there is a rule and form in the part to make the changes there, and a rule a form in the drawing to make the changes from the drawing and push them down to the part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 13:20:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12946867#M7417</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2024-08-08T13:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12948950#M7418</link>
      <description>&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11409245" target="_blank"&gt;@shubham.raturi2308&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Below are my comments to your points&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create Custom Properties&lt;/STRONG&gt;: If you want to define properties with distinct values which depend on others, don't use parameters but implement this functionality outside the model. Don't use parameters, but enforce the iProperty creation and update its values from code.&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Design a Form&lt;/STRONG&gt;: If you want to implement any logic in the form, don't use iLogic forms but use WinForms or WPF and design your own dialog using VisualStudio or another&amp;nbsp; tool. In this case you can implement any logic and dependencies. For example filter possible values for the Prop2 when Prop1 change its value.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Automate iProperties Creation&lt;/STRONG&gt;: When the dialog is confirmed, update iProperties using API.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Integrate with Drawings&lt;/STRONG&gt;: I don't understand what does it mean. In TitleBlock you can reference iProperties from model. Or you can synchronize properties between model and drawing using API.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 09 Aug 2024 10:24:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12948950#M7418</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-08-09T10:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12955295#M7419</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help—it was exactly what I needed. I’m now facing an issue with older files where the required properties are missing, so the form isn’t functioning correctly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I’m considering using external rules to generate properties and employing external and global forms for selecting values. Do you think this is a viable approach, or would you recommend an alternative solution?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I also observed that you included notes in the drawing sheet linking model parameters and drawing parameters. Is this how you connect properties between the model and the drawing?&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not familiar inventor API/VB, but Additionally, I’m interested in learning it. If you could suggest some useful articles, I would greatly appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 07:14:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12955295#M7419</guid>
      <dc:creator>shubham.raturi2308</dc:creator>
      <dc:date>2024-08-13T07:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12955669#M7420</link>
      <description>&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a code to check a custom iprop and if not there create it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me know what you think:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;MakeProp&lt;/SPAN&gt;(&lt;SPAN&gt;"ItemCatagory"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;Function&lt;/SPAN&gt; &lt;SPAN&gt;MakeProp&lt;/SPAN&gt;(&lt;SPAN&gt;Prop&lt;/SPAN&gt;)

	&lt;SPAN&gt;'set ref to active doc&lt;/SPAN&gt;
	&lt;SPAN&gt;ActiveDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
	&lt;SPAN&gt;'check to see if there are any iprops and if not add one, and if so then check to see if iprop exists and if not make it&lt;/SPAN&gt;
	&lt;SPAN&gt;Select&lt;/SPAN&gt; &lt;SPAN&gt;Case&lt;/SPAN&gt; &lt;SPAN&gt;ActiveDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Inventor User Defined Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Count&lt;/SPAN&gt;
		&lt;SPAN&gt;Case&lt;/SPAN&gt; 0
			&lt;SPAN&gt;Call&lt;/SPAN&gt; &lt;SPAN&gt;ActiveDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Inventor User Defined Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;""&lt;/SPAN&gt;, &lt;SPAN&gt;Prop&lt;/SPAN&gt;)
		&lt;SPAN&gt;Case&lt;/SPAN&gt; &lt;SPAN&gt;Else&lt;/SPAN&gt;
			&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Count&lt;/SPAN&gt; = 1 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;ActiveDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Inventor User Defined Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Count&lt;/SPAN&gt;
				&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ActiveDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Inventor User Defined Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;Count&lt;/SPAN&gt;).&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;Prop&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
				&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Count&lt;/SPAN&gt; = &lt;SPAN&gt;ActiveDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Inventor User Defined Properties"&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;ActiveDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Inventor User Defined Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;""&lt;/SPAN&gt;, &lt;SPAN&gt;Prop&lt;/SPAN&gt;)
				&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
			&lt;SPAN&gt;Next&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Select&lt;/SPAN&gt;

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Function&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;use makeprop(String) to call the make prop code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this gets you closer!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 11:24:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12955669#M7420</guid>
      <dc:creator>AndrewHumiston</dc:creator>
      <dc:date>2024-08-13T11:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12956003#M7421</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11409245"&gt;@shubham.raturi2308&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;...older files where the required properties are missing, so the form isn’t functioning correctly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I’m considering using external rules to generate properties and employing external and global forms for selecting values. Do you think this is a viable approach, or would you recommend an alternative solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11409245"&gt;@shubham.raturi2308&lt;/a&gt;&amp;nbsp;, you've said properties above, but the form uses parameters for the controls, so I assume you meant parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I would typically do is make the rule an external rule as you mentioned, and then make the form a global ( external ) form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then have another external rule that creates the parameters if not found (see example below). I add this rule to the &lt;STRONG&gt;After Open Event trigger&lt;/STRONG&gt;, so that it is run when a file is open. In the example below I've added this for all part files:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Curtis_Waguespack_0-1723557116697.png" style="width: 300px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1397316i1E9063BC456DC99A/image-size/small?v=v2&amp;amp;px=200" role="button" title="Curtis_Waguespack_0-1723557116697.png" alt="Curtis_Waguespack_0-1723557116697.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;ValueMap&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;NameValueMap&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateNameValueMap&lt;/SPAN&gt;()
&lt;SPAN&gt;'parameter name and default value&lt;/SPAN&gt;
&lt;SPAN&gt;ValueMap&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;"Prop1"&lt;/SPAN&gt;, &lt;SPAN&gt;"Up"&lt;/SPAN&gt;)
&lt;SPAN&gt;ValueMap&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;"Prop2"&lt;/SPAN&gt;, &lt;SPAN&gt;"Small"&lt;/SPAN&gt;)
&lt;SPAN&gt;ValueMap&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;"Prop3"&lt;/SPAN&gt;, &lt;SPAN&gt;"Friday"&lt;/SPAN&gt;)

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; = 1 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;ValueMap&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;
	&lt;SPAN&gt;PropName&lt;/SPAN&gt; = &lt;SPAN&gt;ValueMap&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;)
	&lt;SPAN&gt;PropValue&lt;/SPAN&gt; = &lt;SPAN&gt;ValueMap&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;PropName&lt;/SPAN&gt;)

	&lt;SPAN&gt;Try&lt;/SPAN&gt;
		&lt;SPAN&gt;oTest&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&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;Item&lt;/SPAN&gt;(&lt;SPAN&gt;PropName&lt;/SPAN&gt;)
	&lt;SPAN&gt;Catch&lt;/SPAN&gt;
		&lt;SPAN&gt;oDoc&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;AddByValue&lt;/SPAN&gt;(&lt;SPAN&gt;PropName&lt;/SPAN&gt;, &lt;SPAN&gt;PropValue&lt;/SPAN&gt;, &lt;SPAN&gt;UnitsTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kTextUnits&lt;/SPAN&gt;)
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
	
	&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;PropName&lt;/SPAN&gt;) = &lt;SPAN&gt;PropValue&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;'set default lists&lt;/SPAN&gt;
&lt;SPAN&gt;MultiValue&lt;/SPAN&gt;.&lt;SPAN&gt;SetList&lt;/SPAN&gt;(&lt;SPAN&gt;"Prop1"&lt;/SPAN&gt;, &lt;SPAN&gt;"Up"&lt;/SPAN&gt;, &lt;SPAN&gt;"Down"&lt;/SPAN&gt;)
&lt;SPAN&gt;MultiValue&lt;/SPAN&gt;.&lt;SPAN&gt;SetList&lt;/SPAN&gt;(&lt;SPAN&gt;"Prop2"&lt;/SPAN&gt;, &lt;SPAN&gt;"Extra Large"&lt;/SPAN&gt;, &lt;SPAN&gt;"Large"&lt;/SPAN&gt;, &lt;SPAN&gt;"Medium"&lt;/SPAN&gt;, &lt;SPAN&gt;"Small"&lt;/SPAN&gt;)
&lt;SPAN&gt;MultiValue&lt;/SPAN&gt;.&lt;SPAN&gt;SetList&lt;/SPAN&gt;(&lt;SPAN&gt;"Prop3"&lt;/SPAN&gt;, &lt;SPAN&gt;"Monday"&lt;/SPAN&gt;, &lt;SPAN&gt;"Teuesday"&lt;/SPAN&gt;, &lt;SPAN&gt;"Wednesday"&lt;/SPAN&gt;, &lt;SPAN&gt;"Thursday"&lt;/SPAN&gt;, &lt;SPAN&gt;"Friday"&lt;/SPAN&gt;)

&lt;SPAN&gt;InventorVb&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentUpdate&lt;/SPAN&gt;()
&lt;/PRE&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, 13 Aug 2024 13:55:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12956003#M7421</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2024-08-13T13:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12956026#M7422</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11409245"&gt;@shubham.raturi2308&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;I also observed that you included notes in the drawing sheet linking model parameters and drawing parameters. Is this how you connect properties between the model and the drawing?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There are a few ways we can do this. In this case since I had parameters set up for use in the form, there were available for use from the model in the drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we only had properties, and not the corresponding parameters then we could just use the properties vs the parameters&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Curtis_Waguespack_0-1723557592026.png" style="width: 300px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1397321i71A2AB4007DF32BE/image-size/small?v=v2&amp;amp;px=200" role="button" title="Curtis_Waguespack_0-1723557592026.png" alt="Curtis_Waguespack_0-1723557592026.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can also use the&amp;nbsp;&lt;STRONG id="GUID-1E32149E-D99B-4875-AEEC-849A36DE5023__GUID-FFA2389E-D696-47BE-A209-21EC292FDFAE" class="ph b"&gt;Copy Model iProperty Settings&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;option in the document settings to synch the model and drawing properties. Typically we'd set this up in the drawing template.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Curtis_Waguespack_1-1723557698416.png" style="width: 300px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1397322i0A1BE7B0E8761F53/image-size/small?v=v2&amp;amp;px=200" role="button" title="Curtis_Waguespack_1-1723557698416.png" alt="Curtis_Waguespack_1-1723557698416.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 14:03:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12956026#M7422</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2024-08-13T14:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12956044#M7423</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11883582"&gt;@AndrewHumiston&lt;/a&gt;&amp;nbsp;,&amp;nbsp;Just a quick tip ( that I overlooked for many years), the iLogic iProperties.Values function will automatically create a property if it does not exist. So in this example, if Foo does not exist, it will be created and the value set with just this one line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we're working with add-ins or straight API calls, and not iLogic then your example is an excellent way to go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Foo"&lt;/SPAN&gt;) = &lt;SPAN&gt;"Hello World"&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 14:09:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12956044#M7423</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2024-08-13T14:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12956087#M7424</link>
      <description>&lt;P&gt;Good to know!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that is code adapted from VBA, but i love learning new methods.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 14:23:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12956087#M7424</guid>
      <dc:creator>AndrewHumiston</dc:creator>
      <dc:date>2024-08-13T14:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958760#M7425</link>
      <description>&lt;P dir="ltr"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This approach worked effectively; however, I encountered an issue where only the parameters were being updated, while the properties remained at their default values. To address this, I added a rule triggered after saving:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;iProperties.Value("Custom", "Prop1") = Parameter("Prop1")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nevertheless, I've encountered another challenge. I need to create two separate sets of rules: one for parts and another for assemblies (Any changes or logic if only one rule can do it), as we're using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Dim oDoc As PartDocument = ThisDoc.Document&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given that the files are old, I’ve successfully created properties for parts and assemblies. However, applying this to drawings will be very manual, requiring individual updates for each file. Do you have any suggestions on how to streamline this?"&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 16:39:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958760#M7425</guid>
      <dc:creator>shubham.raturi2308</dc:creator>
      <dc:date>2024-08-14T16:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958784#M7426</link>
      <description>&lt;P&gt;you could add handling in the begining of the rule to run one set of information based on the file type.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 16:51:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958784#M7426</guid>
      <dc:creator>AndrewHumiston</dc:creator>
      <dc:date>2024-08-14T16:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958867#M7427</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11409245"&gt;@shubham.raturi2308&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're running this in the models (parts and assemblies) , I think you can just change that line to this, to have a rule to run in both&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;Dim oDoc As Document = ThisDoc.Document&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 17:18:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958867#M7427</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2024-08-14T17:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958888#M7428</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11883582"&gt;@AndrewHumiston&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Added "Check document" as suggested in the start now, the same rule is working on part and Assembly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Get the active document
Dim oDoc As Document = ThisApplication.ActiveDocument

' Declare the ComponentDefinition object
Dim oCompDef As ComponentDefinition

' Check the document type and set the correct object
If oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
    Dim oPartDoc As PartDocument = oDoc
    oCompDef = oPartDoc.ComponentDefinition
ElseIf oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
    Dim oAsmDoc As AssemblyDocument = oDoc
    oCompDef = oAsmDoc.ComponentDefinition
ElseIf oDoc.DocumentType = DocumentTypeEnum.kDrawingDocumentObject Then
    Dim oDrawDoc As DrawingDocument = oDoc
    Dim oSheet As Sheet = oDrawDoc.Sheets.Item(1)
    oCompDef = oSheet.DrawingViews.Item(1).ReferencedDocument.ComponentDefinition
End If

' Create a NameValueMap to store parameter names and default values
Dim ValueMap As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap()
' Parameter name and default value
ValueMap.Add("Prop1", "Up")
ValueMap.Add("Prop2", "Small")
ValueMap.Add("Prop3", "Friday")

For i = 1 To ValueMap.Count
    PropName = ValueMap.Name(i)
    PropValue = ValueMap.Value(PropName)

    Try
        ' Try to get the existing parameter
        oTest = oCompDef.Parameters.UserParameters.Item(PropName)
    Catch
        ' If the parameter doesn't exist, add it
        oCompDef.Parameters.UserParameters.AddByValue(PropName, PropValue, UnitsTypeEnum.kTextUnits)
    End Try
    
    ' Set the iProperty value
    iProperties.Value("Custom", PropName) = PropValue
Next

' Set default lists
MultiValue.SetList("Prop1", "Up", "Down")
MultiValue.SetList("Prop2", "Extra Large", "Large", "Medium", "Small")
MultiValue.SetList("Prop3", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday")

' Update the document
InventorVb.DocumentUpdate()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Still not sure how to tackle the drawing properties problem.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 17:32:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958888#M7428</guid>
      <dc:creator>shubham.raturi2308</dc:creator>
      <dc:date>2024-08-14T17:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958924#M7429</link>
      <description>&lt;P&gt;This single line merges 7 lines into one.&amp;nbsp; Just wow.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As Document = ThisDoc.Document&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 17:49:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958924#M7429</guid>
      <dc:creator>shubham.raturi2308</dc:creator>
      <dc:date>2024-08-14T17:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958961#M7430</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;"&lt;SPAN&gt;you can synchronize properties between model and drawing using API&lt;/SPAN&gt;"&lt;BR /&gt;&lt;BR /&gt;Can you give an example?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 18:12:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12958961#M7430</guid>
      <dc:creator>shubham.raturi2308</dc:creator>
      <dc:date>2024-08-14T18:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Properties and Form</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12959920#M7431</link>
      <description>&lt;P&gt;Full implementation you can see and test &lt;A href="https://help.holixa.com/holixa-tools4inventor/commands-overview/be.smart-t4i/edit-settings/auto-iproperties/synchronization-of-iproperties" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;The minimalistic implementation can look like this rule. The code needs to be run from drawing and it copy iProperty values from model to drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Dim drw As DrawingDocument = ThisDrawing.Document
Dim model = ThisDrawing.ModelDocument.DisplayName

iProperties.Value(drw, "Project", "Description") = iProperties.Value(model, "Project", "Description")
iProperties.Value(drw, "Custom", "PropertyName") = iProperties.Value(model, "Custom", "PropertyName")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 06:26:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-properties-and-form/m-p/12959920#M7431</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2024-08-15T06:26:43Z</dc:date>
    </item>
  </channel>
</rss>

