<?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: Copy ilogic rules between two files in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834629#M56678</link>
    <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5542413"&gt;@martinkasparides&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure where how you want to run the rule that copies the rules and triggers from the template. But I made an example for you and hopefully you can tweak it to fit your needs. Just put your document paths to the document to copy from and copy in the rule instead of my test paths and see how it works for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This rule will copy all the rules and event triggers from one document ("copyFrom") to another document ("copyTo")&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Main&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;copyFrom&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Documents&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Open&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"C:\Users\hfljf\Desktop\COPYFROM.ipt"&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;) &lt;SPAN style="color: #808080;"&gt;'Document to copy from&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Documents&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Open&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"C:\Users\hfljf\Desktop\COPYTO.ipt"&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;) &lt;SPAN style="color: #808080;"&gt;'Document to copy to&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;'Copy the rules&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;CopyRules&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt;)
	&lt;SPAN style="color: #808080;"&gt;'Copy the Event triggers&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;CopyEventsPropSet&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt;)
	&lt;SPAN style="color: #808080;"&gt;'Close the original document&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;copyFrom&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Close&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;'Save the document to which rules and triggers has been copied&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Save&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;'Close document&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Close&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;CopyRules&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oRule&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800080;"&gt;iLogicRule&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800080;"&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Automation&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Rules&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CopyFrom&lt;/SPAN&gt;)
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oCopy&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800080;"&gt;iLogicRule&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Automation&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;AddRule&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oRule&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Name&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;""&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oCopy&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Text&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oRule&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Text&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;CopyEventsPropSet&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPropSet&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;CopyFrom&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Try&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;).&lt;SPAN style="color: #800000;"&gt;Delete&lt;/SPAN&gt;()
	&lt;SPAN style="color: #ff0000;"&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Try&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;newPropSet&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Add&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"_iLogicEventsRules"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;prop&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Property&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPropSet&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;newPropSet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Add&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;prop&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;prop&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Name&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;prop&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropId&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 30 Oct 2020 11:38:45 GMT</pubDate>
    <dc:creator>JhoelForshav</dc:creator>
    <dc:date>2020-10-30T11:38:45Z</dc:date>
    <item>
      <title>Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9833514#M56675</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please, I don't know, how I can copy ilogic rules from template drawing to other drawing files using ilogic (VB.net API). And if it's possible, how i can set copied ilogic rule to event run after save file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my program, I am changing title block in old drawings to a new block from template, but i need to old drawing copy three ilogic rules and set event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank's a lot, sorry for my English, I'm a beginner &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 22:46:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9833514#M56675</guid>
      <dc:creator>martinkasparides</dc:creator>
      <dc:date>2020-10-29T22:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834085#M56676</link>
      <description>&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What about creating external rules&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;FINET L.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 07:26:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834085#M56676</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2020-10-30T07:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834405#M56677</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5542413"&gt;@martinkasparides&lt;/a&gt;&amp;nbsp; I think copying ilogic code from one file to other is not easy. There is someting they called code injector but I haven't tried it myself. Please check if this is what you are looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-forum/code-injector/td-p/7070981" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-forum/code-injector/td-p/7070981&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 10:00:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834405#M56677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-30T10:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834629#M56678</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5542413"&gt;@martinkasparides&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure where how you want to run the rule that copies the rules and triggers from the template. But I made an example for you and hopefully you can tweak it to fit your needs. Just put your document paths to the document to copy from and copy in the rule instead of my test paths and see how it works for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This rule will copy all the rules and event triggers from one document ("copyFrom") to another document ("copyTo")&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Main&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;copyFrom&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Documents&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Open&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"C:\Users\hfljf\Desktop\COPYFROM.ipt"&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;) &lt;SPAN style="color: #808080;"&gt;'Document to copy from&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Documents&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Open&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"C:\Users\hfljf\Desktop\COPYTO.ipt"&lt;/SPAN&gt;, &lt;SPAN style="color: #ff0000;"&gt;False&lt;/SPAN&gt;) &lt;SPAN style="color: #808080;"&gt;'Document to copy to&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;'Copy the rules&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;CopyRules&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt;)
	&lt;SPAN style="color: #808080;"&gt;'Copy the Event triggers&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;CopyEventsPropSet&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt;)
	&lt;SPAN style="color: #808080;"&gt;'Close the original document&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;copyFrom&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Close&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;'Save the document to which rules and triggers has been copied&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Save&lt;/SPAN&gt;
	&lt;SPAN style="color: #808080;"&gt;'Close document&lt;/SPAN&gt;
	&lt;SPAN style="color: #800000;"&gt;copyTo&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Close&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;CopyRules&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oRule&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800080;"&gt;iLogicRule&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800080;"&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Automation&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Rules&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CopyFrom&lt;/SPAN&gt;)
		&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oCopy&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800080;"&gt;iLogicRule&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Automation&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;AddRule&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;oRule&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Name&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;""&lt;/SPAN&gt;)
		&lt;SPAN style="color: #800000;"&gt;oCopy&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Text&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;oRule&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Text&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;CopyEventsPropSet&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPropSet&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;CopyFrom&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Try&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;).&lt;SPAN style="color: #800000;"&gt;Delete&lt;/SPAN&gt;()
	&lt;SPAN style="color: #ff0000;"&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Try&lt;/SPAN&gt;
	&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;newPropSet&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;CopyTo&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Add&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"_iLogicEventsRules"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;prop&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Property&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPropSet&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;newPropSet&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Add&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;prop&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;prop&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;Name&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;prop&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;PropId&lt;/SPAN&gt;)
	&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Oct 2020 11:38:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834629#M56678</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-10-30T11:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834933#M56679</link>
      <description>&lt;P&gt;It works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe title="YouTube video player" width="200" height="112" src="https://www.youtube.com/embed/rgu0Hv63cWg" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 13:42:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834933#M56679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-30T13:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834961#M56680</link>
      <description>&lt;P&gt;Hi, thank you for reply. Your solution looks fine, but i have a (beginner) problem. I need this code apply in my API and I have problem to transform to vb.net. I tried it, but .... ilogicVb is not declared. I Imports two dll's&amp;nbsp;Imports Autodesk.iLogic.Automation and Autodesk.iLogic.Interfaces.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your help&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 13:54:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9834961#M56680</guid>
      <dc:creator>martinkasparides</dc:creator>
      <dc:date>2020-10-30T13:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9835057#M56681</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5542413"&gt;@martinkasparides&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I put together a quick VS forms app for you. See attached rar-archive. I made a simple form to copy the rules and event triggers. You can see in the code how i obtained the ilogic automation object. hope it helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 14:30:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9835057#M56681</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-10-30T14:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9835072#M56682</link>
      <description>&lt;P&gt;You are the best! Thanks a lot. Have a nice day&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 14:35:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9835072#M56682</guid>
      <dc:creator>martinkasparides</dc:creator>
      <dc:date>2020-10-30T14:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9835171#M56683</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5330176"&gt;@JhoelForshav&lt;/a&gt;&amp;nbsp; I'm taking this opportunity to learn. You gave me before the solution of pdffill, from that code I took the same concept and made it work somehow. Need your comment how to improve.&lt;/P&gt;&lt;P&gt;Thank you, I learned many things from you and the rest of the top solution authors here.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="video-embed-center video-embed"&gt;&lt;iframe title="YouTube video player" width="200" height="112" src="https://www.youtube.com/embed/8sYcqOFqUsE" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt; ()
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oFileDlg&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;FileDialog&lt;/SPAN&gt; = &lt;SPAN&gt;Nothing&lt;/SPAN&gt;
	&lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;CreateFileDialog&lt;/SPAN&gt;(&lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;)
	&lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;Filter&lt;/SPAN&gt; = &lt;SPAN&gt;"Autodesk Inventor Drawings (*.idw)|*.idw"&lt;/SPAN&gt;
	&lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;DialogTitle&lt;/SPAN&gt; = &lt;SPAN&gt;"Select Drawings To With The Rule To Copy"&lt;/SPAN&gt;
	&lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;InitialDirectory&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;DesignProjectManager&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDesignProject&lt;/SPAN&gt;.&lt;SPAN&gt;WorkspacePath&lt;/SPAN&gt;
	&lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;MultiSelectEnabled&lt;/SPAN&gt; =&lt;SPAN&gt;True&lt;/SPAN&gt; 
	&lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;FilterIndex&lt;/SPAN&gt; = 1
	&lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;CancelError&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
	&lt;SPAN&gt;On&lt;/SPAN&gt; &lt;SPAN&gt;Error&lt;/SPAN&gt; &lt;SPAN&gt;Resume&lt;/SPAN&gt; &lt;SPAN&gt;Next&lt;/SPAN&gt;
	&lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;ShowOpen&lt;/SPAN&gt;()
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrgDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Err&lt;/SPAN&gt;.&lt;SPAN&gt;Number&lt;/SPAN&gt; &amp;lt;&amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"File not chosen."&lt;/SPAN&gt;,,&lt;SPAN&gt;"Dialog Cancellation"&lt;/SPAN&gt;)
	&lt;SPAN&gt;ElseIf&lt;/SPAN&gt; &lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;""&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oFileName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oFileDlg&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt;.&lt;SPAN&gt;Split&lt;/SPAN&gt;(&lt;SPAN&gt;"|"&lt;/SPAN&gt;)
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;copyFrom&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;Documents&lt;/SPAN&gt;.&lt;SPAN&gt;Open&lt;/SPAN&gt;(&lt;SPAN&gt;"C:\Users\Joseph\Desktop\Inventor Study\AL WASL\Workspaces\Workspace\Test\Copy\CopyFrom.idw"&lt;/SPAN&gt;, &lt;SPAN&gt;False&lt;/SPAN&gt;) &lt;SPAN&gt;'Document to copy from&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;copyTo&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;Documents&lt;/SPAN&gt;.&lt;SPAN&gt;Open&lt;/SPAN&gt;(&lt;SPAN&gt;oFileName&lt;/SPAN&gt;, &lt;SPAN&gt;False&lt;/SPAN&gt;) &lt;SPAN&gt;'Document to copy to&lt;/SPAN&gt;
			&lt;SPAN&gt;'Copy the rules&lt;/SPAN&gt;
			&lt;SPAN&gt;CopyRules&lt;/SPAN&gt;(&lt;SPAN&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN&gt;copyTo&lt;/SPAN&gt;)
			&lt;SPAN&gt;'Copy the Event triggers&lt;/SPAN&gt;
			&lt;SPAN&gt;CopyEventsPropSet&lt;/SPAN&gt;(&lt;SPAN&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN&gt;copyTo&lt;/SPAN&gt;)
			&lt;SPAN&gt;'Close the original document&lt;/SPAN&gt;
			&lt;SPAN&gt;copyFrom&lt;/SPAN&gt;.&lt;SPAN&gt;Close&lt;/SPAN&gt;
			&lt;SPAN&gt;'Save the document to which rules and triggers has been copied&lt;/SPAN&gt;
			&lt;SPAN&gt;copyTo&lt;/SPAN&gt;.&lt;SPAN&gt;Save&lt;/SPAN&gt;
			&lt;SPAN&gt;'Close document&lt;/SPAN&gt;
			&lt;SPAN&gt;copyTo&lt;/SPAN&gt;.&lt;SPAN&gt;Close&lt;/SPAN&gt;
			
		&lt;SPAN&gt;Next&lt;/SPAN&gt;
		
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;



&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;CopyRules&lt;/SPAN&gt;(&lt;SPAN&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;, &lt;SPAN&gt;CopyTo&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;)
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRule&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;iLogicRule&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;Automation&lt;/SPAN&gt;.&lt;SPAN&gt;Rules&lt;/SPAN&gt;(&lt;SPAN&gt;CopyFrom&lt;/SPAN&gt;)
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCopy&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;iLogicRule&lt;/SPAN&gt; = &lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;Automation&lt;/SPAN&gt;.&lt;SPAN&gt;AddRule&lt;/SPAN&gt;(&lt;SPAN&gt;CopyTo&lt;/SPAN&gt;, &lt;SPAN&gt;oRule&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;)
		&lt;SPAN&gt;oCopy&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt; = &lt;SPAN&gt;oRule&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt;
	&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;



&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;CopyEventsPropSet&lt;/SPAN&gt;(&lt;SPAN&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;, &lt;SPAN&gt;CopyTo&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPropSet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN&gt;CopyFrom&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;)
	&lt;SPAN&gt;Try&lt;/SPAN&gt;
		&lt;SPAN&gt;CopyTo&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;).&lt;SPAN&gt;Delete&lt;/SPAN&gt;()
	&lt;SPAN&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;newPropSet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN&gt;CopyTo&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;"_iLogicEventsRules"&lt;/SPAN&gt;, &lt;SPAN&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;)
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;prop&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Property&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oPropSet&lt;/SPAN&gt;
		&lt;SPAN&gt;newPropSet&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;prop&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;, &lt;SPAN&gt;prop&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;prop&lt;/SPAN&gt;.&lt;SPAN&gt;PropId&lt;/SPAN&gt;)
	&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 15:05:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/9835171#M56683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-30T15:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12099942#M56684</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5330176"&gt;@JhoelForshav&lt;/a&gt;&amp;nbsp;this is a pretty cool implementation to copy rules from 1 file to another, but I was wondering if it was possible to take it one step further and get a form from a source doc and copy that to your destination?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added the below but once you get to the Automation there's nothing that references a form&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively is it possible to use iLogic to create a form?&amp;nbsp; Or have a global form that can be accessed and copied into a destination document?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub CopyForm(CopyFrom As Document, CopyTo As Document)
	For Each oForm As iLogicForm In iLogicVb.Automation. 'Nothing exists beyond this point&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 16:02:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12099942#M56684</guid>
      <dc:creator>e_frissell</dc:creator>
      <dc:date>2023-07-13T16:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100026#M56685</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13735267"&gt;@e_frissell&lt;/a&gt;.&amp;nbsp; There is currently not any easy way to do that by code.&amp;nbsp; It is certainly doable manually though.&amp;nbsp; When you create an internal iLogic form (saved within the document), a form specification is created, and the data for that form specification seems to be stored within the document attributes.&amp;nbsp; A new AttributeSet, and a new Attribute are added to the document, and the data for that form specification seems to be stored to the Value of the Attribute as a Byte Array.&amp;nbsp; There is a pretty complicated way of digging into some of the other iLogic resource references that are not normally included in regular rules, and a way to access these form specifications, but I haven't gotten to the point of being able to copy them from one document to another yet.&amp;nbsp; Were close though.&amp;nbsp; We can delete the forms you see in your Forms tab by deleting the AttributeSet / Attribute that are attached to the document, and whose name starts with specific text.&amp;nbsp; I am not sure if that totally deletes them, or just causes them to no longer be visible, and may be messing something up behind the scenes.&amp;nbsp; We just got the ability to close an open iLogic Form this year, so something like this may be coming soon.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 16:45:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100026#M56685</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-07-13T16:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100091#M56686</link>
      <description>&lt;P&gt;Shame.&amp;nbsp; Saw an old post of yours that mentioned being unable to copy forms, but saw that you could right click and copy a form and that got me wondering if there'd been updates on this front&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This might be wild but what's the chance that iLogic can replicate mouse clicks?&amp;nbsp; First macro I ever made was about a decade ago in Solidworks to swap out templates and that was made with the macro recorder which automated the clicks and the location of each click since the dialog box pop ups never changed.&amp;nbsp; It might be possible to replicate this however the lack of a macro recorder would make this way more difficult&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 17:13:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100091#M56686</guid>
      <dc:creator>e_frissell</dc:creator>
      <dc:date>2023-07-13T17:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100127#M56687</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13735267"&gt;@e_frissell&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did just a quick test and this adaption from the above examples seemed to work.&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 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;LI-CODE lang="general"&gt;AddReference "Autodesk.iLogic.Core.dll"
AddReference "Autodesk.iLogic.UiBuilderCore.dll"
Imports iLogicCore = Autodesk.iLogic.Core
Sub Main
	Dim oFileDlg As Inventor.FileDialog = Nothing
	ThisApplication.CreateFileDialog(oFileDlg)
	oFileDlg.Filter = "Inventor Files (*.dwg;*.idw;*.iam;*.ipt)|*.dwg;*.idw;*.iam;*.ipt|All Files (*.*)|*.*"
	oFileDlg.DialogTitle = "Select File"
	oFileDlg.InitialDirectory = ThisApplication.DesignProjectManager.ActiveDesignProject.WorkspacePath
	oFileDlg.MultiSelectEnabled = False
	oFileDlg.FilterIndex = 1
	oFileDlg.CancelError = True
	On Error Resume Next
	oFileDlg.ShowOpen()
	Dim oDrgDoc As DrawingDocument
	If Err.Number &amp;lt;&amp;gt; 0 Then
		MsgBox("File not chosen.", , "Dialog Cancellation")
	ElseIf oFileDlg.FileName &amp;lt;&amp;gt; "" Then
		For Each oFileName As String In oFileDlg.FileName.Split("|")
			Dim copyToDoc As Document = ThisApplication.Documents.Open(oFileName, False) 'Document to copy to
			'Copy the forms
			CopyForms(copyToDoc)
			'Save the document to which the forms were copied
			copyToDoc.Save
			'Close document
			copyToDoc.Close
		Next

	End If
End Sub



Sub CopyForms(CopyToDoc As Document)

	Dim oDoc = ThisApplication.ActiveDocument

	iCount = 0
	Dim oUIatts As New iLogicCore.UiBuilderStorage.UiAttributeStorage(oDoc)
	For Each oName In oUIatts.FormNames
		'  Dim oFormsSpecs = oUIatts.LoadFormSpecification(oName)
		iCount = iCount + 1
	Next

	If iCount = 0 Then
		Exit Sub
	End If

	Dim Attset As Inventor.AttributeSet

	For Each Attset In oDoc.AttributeSets
		If Attset.Name Like "iLogicInternalUi*" Then
			Attset.CopyTo(CopyToDoc)
		End If
	Next
End Sub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 17:34:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100127#M56687</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2023-07-13T17:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100148#M56688</link>
      <description>&lt;P&gt;It might be possible to simulate a series of mouse clicks that way in Inventor, but I have not personally created any automation solutions that way.&amp;nbsp; I have used the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-InteractionEvents" target="_blank" rel="noopener"&gt;InteractionEvents&lt;/A&gt; and &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-MouseEvents" target="_blank" rel="noopener"&gt;MouseEvents&lt;/A&gt; to capture mouse pointer position when the mouse is clicked on several occasions, but not the other way around.&amp;nbsp; Plus using the InteractionEvents is not very convenient.&amp;nbsp; Plus, since the main iLogic tab can be moved around on the screen, and the whole DockableWindow area can be hidden, resized, scrolled, deactivated (other sub tab activated), getting the exact location of an internal iLogic Form's user interface area on the screen reliably would be pretty challenging.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 17:46:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100148#M56688</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-07-13T17:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100154#M56689</link>
      <description>&lt;P&gt;Whoa, there's a lot to unpack with that and frankly I'm not sure where to start haha your iLogic knowledge never ceases to amaze.&amp;nbsp; If you don't mind I'd like to post up what I'm running and could use some help integrating that into my rule.&amp;nbsp; Location would be as called out in sub Main&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Main
	Dim copyFrom As Document = ThisApplication.Documents.Open("myTemplateLocation", False) 'Document to copy from
	Dim copyTo As Document = ThisDoc.Document   's.Open("C:\Users\hfljf\Desktop\COPYTO.ipt", False) 'Document to copy to
	'Copy the rules
	CopyRules(copyFrom, copyTo)
	
	'Copy the Event triggers
	CopyEventsPropSet(copyFrom, copyTo)
	' ------ COPY FORM HERE -------
	' Copy form
	' CopyForm(copyFrom, copyTo) ' Copy form as subroutine
	'iLogicVb.Automation.RunExternalRule(CopyForm) ' Copy form as external rule
	' ------ End copy form -------
	
	'Save the document to which rules and triggers has been copied
	copyTo.Save

End Sub

Sub CopyRules(CopyFrom As Document, CopyTo As Document)
	For Each oRule As iLogicRule In iLogicVb.Automation.Rules(CopyFrom)
		If oRule.Name = "Scale" Then GoTo Skip :
		If oRule.Name = "Date Stamp" Then GoTo Skip :
		Dim oCopy As iLogicRule = iLogicVb.Automation.AddRule(CopyTo, oRule.Name, "")
		oCopy.Text = oRule.Text
		Skip :
		
	Next
End Sub

Sub CopyEventsPropSet(CopyFrom As Document, CopyTo As Document)
	Dim oPropSet As Inventor.PropertySet = CopyFrom.PropertySets("{2C540830-0723-455E-A8E2-891722EB4C3E}")
	Try
		CopyTo.PropertySets("{2C540830-0723-455E-A8E2-891722EB4C3E}").Delete()
	Catch
	End Try
	Dim newPropSet As Inventor.PropertySet = CopyTo.PropertySets.Add("_iLogicEventsRules", "{2C540830-0723-455E-A8E2-891722EB4C3E}")
	For Each prop As Inventor.Property In oPropSet
		newPropSet.Add(prop.Value, prop.Name, prop.PropId)
	Next
End Sub
Sub CopyForm(CopyFrom As Document, CopyTo As Document)
	'For Each oForm As iLogicForm In iLogicVb.Automation.
End Sub
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 17:49:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100154#M56689</guid>
      <dc:creator>e_frissell</dc:creator>
      <dc:date>2023-07-13T17:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100189#M56690</link>
      <description>&lt;P&gt;Cool.&amp;nbsp; I was hoping it was going to be that simple, but I simply had not tried it yet.&amp;nbsp; I just created a simple rule of my own to test with, and got an odd result.&amp;nbsp; When I first ran the rule, the other document was created and visibly shown on my screen.&amp;nbsp; Then I clicked into its Forms tab, and it was not showing anything.&amp;nbsp; Then I want back to the original document and looked at the sample Form there, and that was still there, as expected.&amp;nbsp; Then I went back to the new document and the form was now showing in its Forms tab.&amp;nbsp; This too must need a 'blink' type helper (toggle visibility of the iLogic DockableWindow).&amp;nbsp; When I tried it again, if I stay within that new document, looking at the empty Forms tab, then click the 'x' to close the main iLogic tab, then click the '+' to show it again, the form then shows up.&amp;nbsp; Similar situation to the 'delete forms' scenario.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim oFromDoc As Document = ThisDoc.Document
Dim oSets As AttributeSets = oFromDoc.AttributeSets
If oSets.Count = 0 Then Exit Sub
Dim oToDoc As Document = ThisApplication.Documents.Add(DocumentTypeEnum.kPartDocumentObject)
For Each oSet As AttributeSet In oSets
	'the AttributeSet.Name should start with "iLogicInternalUi"
	If oSet.Name Like "iLogicInternalUi*" Then
		oSet.CopyTo(oToDoc, False)
	End If
Next
'toggle visibility of iLogic dockable window to update it
'For Each oDW As Inventor.DockableWindow In ThisApplication.UserInterfaceManager.DockableWindows
'	If oDW.InternalName = "ilogic.treeeditor" Then
'		oDW.Visible = False
'		oDW.Visible = True
'	End If
'Next&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:05:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100189#M56690</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-07-13T18:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100214#M56691</link>
      <description>&lt;P&gt;If I create the other new document 'invisible', then switch to that document by clicking on the view tab at the bottom, the form is already there, so it's not really much of a problem.&amp;nbsp; The reason I did not specify a specific template was that I wanted to test the whole DocumentInterest thing.&amp;nbsp; When creating the Event Properties PropertySet within another document, the other document usually needs to have a DocumentInterest for the iLogic ApplicationAddin, so that the event triggering will work properly after the fact.&amp;nbsp; That doesn't seem to be a problem in this case.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:22:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100214#M56691</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-07-13T18:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100242#M56692</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13735267"&gt;@e_frissell&lt;/a&gt;&amp;nbsp;,&amp;nbsp;Give this a try.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From my quick and dirty testing, I think this might fail if the CopyTo document already has one or more forms in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim copyFrom As Document = ThisApplication.Documents.Open("myTemplateLocation", False) 'Document to copy from&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;copyTo&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;    &lt;SPAN&gt;'Document to copy to&lt;/SPAN&gt;
	&lt;SPAN&gt;'Copy the rules&lt;/SPAN&gt;
	&lt;SPAN&gt;CopyRules&lt;/SPAN&gt;(&lt;SPAN&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN&gt;copyTo&lt;/SPAN&gt;)

	&lt;SPAN&gt;'Copy the Event triggers&lt;/SPAN&gt;
	&lt;SPAN&gt;CopyEventsPropSet&lt;/SPAN&gt;(&lt;SPAN&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN&gt;copyTo&lt;/SPAN&gt;)

	&lt;SPAN&gt;' Copy form&lt;/SPAN&gt;
	&lt;SPAN&gt;CopyForm&lt;/SPAN&gt;(&lt;SPAN&gt;copyFrom&lt;/SPAN&gt;, &lt;SPAN&gt;copyTo&lt;/SPAN&gt;)

	&lt;SPAN&gt;'Save the document to which rules and triggers has been copied&lt;/SPAN&gt;
	&lt;SPAN&gt;copyTo&lt;/SPAN&gt;.&lt;SPAN&gt;Save&lt;/SPAN&gt;
	&lt;SPAN&gt;copyFrom&lt;/SPAN&gt;.&lt;SPAN&gt;close&lt;/SPAN&gt;

&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;CopyRules&lt;/SPAN&gt;(&lt;SPAN&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;, &lt;SPAN&gt;CopyTo&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;)
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oRule&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;iLogicRule&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;Automation&lt;/SPAN&gt;.&lt;SPAN&gt;Rules&lt;/SPAN&gt;(&lt;SPAN&gt;CopyFrom&lt;/SPAN&gt;)
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oRule&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;"Scale"&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;GoTo&lt;/SPAN&gt; &lt;SPAN&gt;Skip&lt;/SPAN&gt; :
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oRule&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;"Date Stamp"&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;GoTo&lt;/SPAN&gt; &lt;SPAN&gt;Skip&lt;/SPAN&gt; :
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCopy&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;iLogicRule&lt;/SPAN&gt; = &lt;SPAN&gt;iLogicVb&lt;/SPAN&gt;.&lt;SPAN&gt;Automation&lt;/SPAN&gt;.&lt;SPAN&gt;AddRule&lt;/SPAN&gt;(&lt;SPAN&gt;CopyTo&lt;/SPAN&gt;, &lt;SPAN&gt;oRule&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;)
		&lt;SPAN&gt;oCopy&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt; = &lt;SPAN&gt;oRule&lt;/SPAN&gt;.&lt;SPAN&gt;Text&lt;/SPAN&gt;
		&lt;SPAN&gt;Skip&lt;/SPAN&gt; :

	&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;CopyEventsPropSet&lt;/SPAN&gt;(&lt;SPAN&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;, &lt;SPAN&gt;CopyTo&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPropSet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN&gt;CopyFrom&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;)
	&lt;SPAN&gt;Try&lt;/SPAN&gt;
		&lt;SPAN&gt;CopyTo&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;).&lt;SPAN&gt;Delete&lt;/SPAN&gt;()
	&lt;SPAN&gt;Catch&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;newPropSet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySet&lt;/SPAN&gt; = &lt;SPAN&gt;CopyTo&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;"_iLogicEventsRules"&lt;/SPAN&gt;, &lt;SPAN&gt;"{2C540830-0723-455E-A8E2-891722EB4C3E}"&lt;/SPAN&gt;)
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;prop&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Property&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oPropSet&lt;/SPAN&gt;
		&lt;SPAN&gt;newPropSet&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;prop&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;, &lt;SPAN&gt;prop&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;prop&lt;/SPAN&gt;.&lt;SPAN&gt;PropId&lt;/SPAN&gt;)
	&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;CopyForm&lt;/SPAN&gt;(&lt;SPAN&gt;CopyFrom&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;, &lt;SPAN&gt;CopyToDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt;)

	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;Attset&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;AttributeSet&lt;/SPAN&gt;
	&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;Attset&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;CopyFrom&lt;/SPAN&gt;.&lt;SPAN&gt;AttributeSets&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Attset&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; &lt;SPAN&gt;Like&lt;/SPAN&gt; &lt;SPAN&gt;"iLogicInternalUi*"&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;Try&lt;/SPAN&gt;
				&lt;SPAN&gt;Attset&lt;/SPAN&gt;.&lt;SPAN&gt;CopyTo&lt;/SPAN&gt;(&lt;SPAN&gt;CopyToDoc&lt;/SPAN&gt;)
			&lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
				&lt;SPAN&gt;Logger&lt;/SPAN&gt;.&lt;SPAN&gt;Error&lt;/SPAN&gt;(&lt;SPAN&gt;ex&lt;/SPAN&gt;.&lt;SPAN&gt;Message&lt;/SPAN&gt;)
			&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&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;Sub&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:53:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100242#M56692</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2023-07-13T18:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100260#M56693</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;FONT size="2"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;wrote:&lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If I create the other new document 'invisible', then switch to that document by clicking on the view tab at the bottom, the form is already there, so it's not really much of a problem.&amp;nbsp;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This and what you mentioned previously was what I was seeing also.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'd really like to be able to do is copy a specific form by name. There is a SaveFormSpecification call that might do it, but I don't have time to dig into it at the moment.&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-1689274149087.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1240263i108EA7F5B7C55FCD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Curtis_Waguespack_0-1689274149087.png" alt="Curtis_Waguespack_0-1689274149087.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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;AddReference "Autodesk.iLogic.Core.dll"
AddReference "Autodesk.iLogic.UiBuilderCore.dll"
Imports iLogicCore = Autodesk.iLogic.Core

	Dim oUIatts As New iLogicCore.UiBuilderStorage.UiAttributeStorage(ThisDoc.Document)
	For Each oName In oUIatts.FormNames
		Logger.Info(oName)		
		If oName = "Best Form Ever" Then
			Dim oFormsSpecs = oUIatts.LoadFormSpecification(oName)
			'oUIatts.SaveFormSpecification()
		End If
	Next&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:52:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100260#M56693</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2023-07-13T18:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ilogic rules between two files</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100309#M56694</link>
      <description>&lt;P&gt;Me too.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&amp;nbsp; I have already been able to dig into the individual controls within the forms, but its all still a bit more complicated than I had hoped for.&amp;nbsp; And haven't found the time to dig deeper yet.&amp;nbsp; Fairly optimistic about it though.&amp;nbsp; And every one of these steps along the way helps.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 19:05:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/copy-ilogic-rules-between-two-files/m-p/12100309#M56694</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-07-13T19:05:37Z</dc:date>
    </item>
  </channel>
</rss>

