<?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: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976829#M171078</link>
    <description>&lt;P class="lia-align-left"&gt;Is this what you mean?&lt;/P&gt;
&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2024 10:49:04 GMT</pubDate>
    <dc:creator>bradeneuropeArthur</dc:creator>
    <dc:date>2024-08-23T10:49:04Z</dc:date>
    <item>
      <title>REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12974861#M171041</link>
      <description>&lt;P&gt;This should be simple a simple request. Im looking for how to reference a custom property of the assembly in the first view of a drawing.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 13:17:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12974861#M171041</guid>
      <dc:creator>SECOJOSE</dc:creator>
      <dc:date>2024-08-22T13:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976770#M171077</link>
      <description>&lt;P&gt;Hi, this could be a start&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the first view reference is an assembly document and if the assembly document references a custom property a message box will appear with value.&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;Sub&lt;/SPAN&gt; &lt;SPAN&gt;main&lt;/SPAN&gt;
	   &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;CustomProp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;"CustompropName"&lt;/SPAN&gt; &lt;SPAN&gt;'property to be found change this&lt;/SPAN&gt;

        &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
        &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingViews&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt; = 0 &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
        &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oView&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingView&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingViews&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1) &lt;SPAN&gt;'firts view to be found&lt;/SPAN&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;Document&lt;/SPAN&gt; = &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocumentDescriptor&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocument&lt;/SPAN&gt;
        &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kAssemblyDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;

            &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCustomprop&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;GetCustomprop&lt;/SPAN&gt;(&lt;SPAN&gt;oDoc&lt;/SPAN&gt;, &lt;SPAN&gt;CustomProp&lt;/SPAN&gt;)
            &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oCustomprop&lt;/SPAN&gt; &lt;SPAN&gt;IsNot&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
                &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oCustompropValue&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;oCustomprop&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;
                &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;oCustompropValue&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;If&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
	
		 &lt;SPAN&gt;Private&lt;/SPAN&gt; &lt;SPAN&gt;Function&lt;/SPAN&gt; &lt;SPAN&gt;GetCustomprop&lt;/SPAN&gt;(&lt;SPAN&gt;AssyDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;, &lt;SPAN&gt;CustomProp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&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;Dim&lt;/SPAN&gt; &lt;SPAN&gt;result&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;Nothing&lt;/SPAN&gt;
        &lt;SPAN&gt;Try&lt;/SPAN&gt;
            &lt;SPAN&gt;' Get the PropertySets object.&lt;/SPAN&gt;
            &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPropSets&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PropertySets&lt;/SPAN&gt; = &lt;SPAN&gt;AssyDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;
            &lt;SPAN&gt;' Get the design tracking property set.&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;oPropSets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Inventor User Defined Properties"&lt;/SPAN&gt;)
            &lt;SPAN&gt;' Get the part number iProperty.&lt;/SPAN&gt;
            &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPartNumiProp&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;oPropSet&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;CustomProp&lt;/SPAN&gt;)
            &lt;SPAN&gt;result&lt;/SPAN&gt; = &lt;SPAN&gt;oPartNumiProp&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;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
        &lt;SPAN&gt;Return&lt;/SPAN&gt; &lt;SPAN&gt;result&lt;/SPAN&gt;
    &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Function&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a response answers your question, please use&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;ACCEPT SOLUTION&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;to assist other users later.&lt;/P&gt;&lt;P&gt;Also be generous with Likes!&amp;nbsp; Thank you and enjoy!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 10:02:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976770#M171077</guid>
      <dc:creator>nstevelmans</dc:creator>
      <dc:date>2024-08-23T10:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976829#M171078</link>
      <description>&lt;P class="lia-align-left"&gt;Is this what you mean?&lt;/P&gt;
&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 10:49:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976829#M171078</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2024-08-23T10:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976832#M171079</link>
      <description>&lt;P&gt;Is this what you mean?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 10:50:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976832#M171079</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2024-08-23T10:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976865#M171082</link>
      <description>&lt;P&gt;Im looking for something similar to the parameter snippet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Parameter("ASSYNAME.iam.PARAMETERNAME")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But im trying to call a property of the assembly instead of a parameter. Is that much code required for something like the above for properties?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 11:13:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12976865#M171082</guid>
      <dc:creator>SECOJOSE</dc:creator>
      <dc:date>2024-08-23T11:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12977489#M171099</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13441446"&gt;@SECOJOSE&lt;/a&gt;.&amp;nbsp; I think you are looking for something like this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim sTitle As String = iProperties.Value("22240287.iam", "Summary", "Title")
Logger.Info(sTitle)&lt;/LI-CODE&gt;
&lt;P&gt;...where&amp;nbsp;"22240287.iam" is the file name, with file extension, of the assembly being referenced in your drawing.&amp;nbsp; This type of iLogic shortcut snippet can 'reach' any document that is being referenced by the current document that the rule is acting upon.&amp;nbsp; The "Summary" is associated with which PropertySet the iProperty is located within, then the "Title" is the name of the iProperty.&amp;nbsp; Just change those as needed.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 15:35:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12977489#M171099</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-08-23T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12977545#M171100</link>
      <description>&lt;P&gt;Thats what i needed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im trying to make the description of a drawing file match the description of the model in the first view, however, the model has multiple model states. The way this snippet works now is that it will grab the description of the model state the model was saved in. Is there a way to specify which model state to pull the description from?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 16:00:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12977545#M171100</guid>
      <dc:creator>SECOJOSE</dc:creator>
      <dc:date>2024-08-23T16:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12977589#M171102</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13441446"&gt;@SECOJOSE&lt;/a&gt;.&amp;nbsp; I'm still using Inventor Pro 2024.3, and there is nothing within the standard iLogic 'snippets' that suggests a way to specify a specific ModelState for this code to focus on yet.&amp;nbsp; I know that in 2025 some advancements were made to give us more control over how those 'simplistic' iLogic shortcut snippets access documents with multiple ModelStates in them, but I thing that additional control is mainly focussed on whether your 'edits' will effect only the 'active' ModelState or 'all' ModelStates in the target document.&amp;nbsp; I am not sure if they added a way to say which specific ModelState you want it to read from / write to with that code tool.&amp;nbsp; There are also multiple other uncertainties (not well documented anywhere) about how that simplistic code tool will work in different situations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try replacing the regular file name, with extension with "22240287.iam (Model State1)", where the name of the ModelState is included at the end, after a single space, and within ( &amp;amp; ) symbols, like how it appears in the Document.DisplayName value, when representing a ModelState member.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, then the whole issue of factory vs member thing comes into play.&amp;nbsp; We can usually read or write to the 'factory' version of a model document, but can only read from member versions of the document.&amp;nbsp; There is only a 'factory' when there are 2 or more ModelStates present, and the factory is simply the document associated with whichever ModelState happens to be 'active' at that time.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 16:29:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12977589#M171102</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-08-23T16:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: REFERENCE IPROPERTY IN ASSEMBLY OF FIRST VIEW IN A DRAWING</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12977619#M171103</link>
      <description>&lt;P&gt;Thank you very much for your help. Its unfortunate about the lack of control with model states, but im going to try a workaround involving a program that opens the model, changes the model's model state to the model state presented in the view, saving it, then updating the description. Not the most elegant solution but hopefully it will tie me over until Autodesk catches up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 16:49:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/reference-iproperty-in-assembly-of-first-view-in-a-drawing/m-p/12977619#M171103</guid>
      <dc:creator>SECOJOSE</dc:creator>
      <dc:date>2024-08-23T16:49:08Z</dc:date>
    </item>
  </channel>
</rss>

