<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to delete ilogic forms using .net in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/7428080#M133634</link>
    <description>&lt;P&gt;I see, this is an old post &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;in .net you need a reference to Autodesk.ilogic.core.dll&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you can use:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Imports ilc = Autodesk.iLogic.Core

public class myIlogic

    Public Shared Sub DeleteForms(doc As Document, optional FormName a string =Nothing)
        Dim uiatts As New ilc.UiBuilderStorage.UiAttributeStorage(doc)
        For Each name In uiatts.FormNames
            Dim fsp = uiatts.LoadFormSpecification(name)
            if FormName isnot nothing
                if FormName.Equals(name) Then
                    uiatts.DeleteFormSpecification(name)
                end if
            else
                uiatts.DeleteFormSpecification(name)
            End if
        Next
    End Sub

end class&lt;/PRE&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2017 13:03:46 GMT</pubDate>
    <dc:creator>dba78</dc:creator>
    <dc:date>2017-10-03T13:03:46Z</dc:date>
    <item>
      <title>How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3691442#M133626</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone please tell me how to delete iLogic forms from Inventor 2013 parts/assembly&amp;nbsp;using VB.net 2010?&lt;/P&gt;&lt;P&gt;I am able to delete all the rule using "Activated_iLogic.DeleteAllRules(PartDoc)" but "Activated_iLogic.DeleteAllForms(PartDoc)" or "Activated_iLogic.DeleteForm(PartDoc, FormName)" does not give me the result I was expecting and Google is not showing any result related to this.&lt;BR /&gt;&lt;BR /&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JJ&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2012 01:26:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3691442#M133626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-08T01:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3693836#M133628</link>
      <description>&lt;DIV class="lia-message-body lia-component-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;The forms are stored in the document's attributesets.&amp;nbsp; If you delete the attributeset/attribute, the form is gone.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Nov 2012 15:17:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3693836#M133628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-09T15:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3697872#M133629</link>
      <description>&lt;P&gt;Hi Farren,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the suggestion. I can't get it to work but that is because of my lack of understanding the API&amp;nbsp;&amp;amp; .net skills.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2012 19:49:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3697872#M133629</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-13T19:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3708448#M133630</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;&lt;A id="link_13b2626aac9" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/551839" target="_self"&gt;FarrenYoung&lt;/A&gt;&amp;nbsp;means Document.AttributeSets which stores the attribute sets . Each attributeset has attributes. It allows developers to attach custom information with the document.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="login-bold"&gt;I checked the assembly&amp;nbsp;Autodesk.iLogic.Interfaces, but I did not see the method&amp;nbsp;&lt;SPAN&gt;DeleteAllForms or&amp;nbsp;&lt;SPAN&gt;DeleteForm. And it looks no methods to delete forms. From where you got the two methods?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2012 04:01:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3708448#M133630</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2012-11-22T04:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3708470#M133631</link>
      <description>&lt;P&gt;Hi Xiaodong, thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to delete rules and I tought that if I wanted to delete forms I needed to use the iLogic statements so that's how I came up with the 2 methods.&lt;BR /&gt;I have started with vb.net a couple of weeks ago and still struggling understanding the API and how to communicate with Inventor when I want something done. Replacing parts or subassemblies in an assembly&amp;nbsp;took me a day to get that working. I am on a trail and error mode to get things done.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2012 04:34:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3708470#M133631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-22T04:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3742614#M133632</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, I still have no idea how to delete the iLogic form by code. I doubt this may be a requirement which has not been exposed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Dec 2012 11:24:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/3742614#M133632</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2012-12-26T11:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/5732420#M133633</link>
      <description>&lt;P&gt;Was looking for the same thing and found this&lt;/P&gt;&lt;P&gt;Hope i helps&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.cadlinecommunity.co.uk/hc/en-us/articles/202020531-Inventor-2015-iLogic-Delete-All-iLogic-Rules-in-Entire-Assembly" target="_blank"&gt;https://www.cadlinecommunity.co.uk/hc/en-us/articles/202020531-Inventor-2015-iLogic-Delete-All-iLogic-Rules-in-Entire-Assembly&lt;/A&gt;&amp;nbsp;by LukeDavenport&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2015 20:32:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/5732420#M133633</guid>
      <dc:creator>BWMcDowell</dc:creator>
      <dc:date>2015-07-21T20:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/7428080#M133634</link>
      <description>&lt;P&gt;I see, this is an old post &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;in .net you need a reference to Autodesk.ilogic.core.dll&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you can use:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Imports ilc = Autodesk.iLogic.Core

public class myIlogic

    Public Shared Sub DeleteForms(doc As Document, optional FormName a string =Nothing)
        Dim uiatts As New ilc.UiBuilderStorage.UiAttributeStorage(doc)
        For Each name In uiatts.FormNames
            Dim fsp = uiatts.LoadFormSpecification(name)
            if FormName isnot nothing
                if FormName.Equals(name) Then
                    uiatts.DeleteFormSpecification(name)
                end if
            else
                uiatts.DeleteFormSpecification(name)
            End if
        Next
    End Sub

end class&lt;/PRE&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 13:03:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/7428080#M133634</guid>
      <dc:creator>dba78</dc:creator>
      <dc:date>2017-10-03T13:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/9634492#M133635</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;I see this is a very old post...&lt;span class="lia-unicode-emoji" title=":see_no_evil_monkey:"&gt;🙈&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for the code.&lt;/P&gt;&lt;P&gt;But how can I manipulate this code for use in iLogic?&lt;/P&gt;&lt;P&gt;In version 2019 this code fails. (see picture)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hkempeneers_0-1594732921973.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/795169i411CB7DCC8107B88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hkempeneers_0-1594732921973.png" alt="hkempeneers_0-1594732921973.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We really need code to delete forms from within an Inventor model.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 13:24:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/9634492#M133635</guid>
      <dc:creator>hkempeneers</dc:creator>
      <dc:date>2020-07-14T13:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/9634634#M133636</link>
      <description>&lt;P&gt;Hi, in an iLogic rule the core would look something like this&lt;/P&gt;&lt;P&gt;This code &lt;U&gt;should&lt;/U&gt; delete all forms in the current 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;AddReference "Autodesk.iLogic.Core.dll"
AddReference "Autodesk.iLogic.UiBuilderCore.dll"

Imports ilc= Autodesk.iLogic.Core
Dim doc = ThisApplication.ActiveDocument 

Dim uiatts As New ilc.UiBuilderStorage.UiAttributeStorage(doc)
For Each name In uiatts.FormNames
    Dim fsp = uiatts.LoadFormSpecification(name)
    uiatts.DeleteFormSpecification(name)                        
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This throws me an error on inventor 2020.3.1 stating there was&amp;nbsp; problem with the different Versions of the referenced Assemblies.... However, you may be lucky and there is not version-interference in the 2019-assemblies.&lt;BR /&gt;I couldn't find any option to turn off the version restriction in iLogic (not sure this constellation would even work in a .net-Addin).&lt;/P&gt;&lt;P&gt;Anyway,&amp;nbsp; the code should work, if the assemblies aren't mixed up (by Autodesk)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively you may check the Attributes of the Document (since iLogic stores all its information in a document-Attributes) and delete them.... This is a real brute-force attempt but might work for your scenario:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim Attset As Inventor.AttributeSet 
Dim doc As Inventor.Document
doc = ThisApplication.ActiveDocument 

For Each Attset In doc.AttributeSets
	If Attset.Name Like "iLogicInternalUi*" Then
		Attset.Delete 
	End If 
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as a side node, the Forms are cached, so they will still be available until the iLogic-Window isn't closed and reopened.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 14:11:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/9634634#M133636</guid>
      <dc:creator>dba78</dc:creator>
      <dc:date>2020-07-14T14:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/9636109#M133637</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for this solutions!&lt;/P&gt;&lt;P&gt;It works for us.&lt;/P&gt;&lt;P&gt;You wrote "&lt;SPAN&gt;This is a real brute-force attempt.."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sometimes we need brute force to&amp;nbsp;make life more pleasant. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 06:01:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/9636109#M133637</guid>
      <dc:creator>hkempeneers</dc:creator>
      <dc:date>2020-07-15T06:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete ilogic forms using .net</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/9636118#M133638</link>
      <description>&lt;P&gt;So true...!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 06:10:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-delete-ilogic-forms-using-net/m-p/9636118#M133638</guid>
      <dc:creator>dba78</dc:creator>
      <dc:date>2020-07-15T06:10:24Z</dc:date>
    </item>
  </channel>
</rss>

