<?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: Trying to pull a custom iProperty from a main view in a drawing in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12747596#M166886</link>
    <description>&lt;P&gt;That worked perfectly thank you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joe_lovegunn_0-1714634452369.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1357339i87E431CD36BE7F5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joe_lovegunn_0-1714634452369.png" alt="joe_lovegunn_0-1714634452369.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2024 07:20:59 GMT</pubDate>
    <dc:creator>joe_love-gunn</dc:creator>
    <dc:date>2024-05-02T07:20:59Z</dc:date>
    <item>
      <title>Trying to pull a custom iProperty from a main view in a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12746442#M166855</link>
      <description>&lt;P&gt;Hi I am currently trying to pull a custom parameter out of a main view in a drawing sheet, the end goal is to rename the sheet to the value of that parameter, however whenever I run the code the parameter cannot be found. I have changed the parameter value from "Panel ID" on Line 21 to "Author" and the Author can be found, but my custom iProperty cannot. I am not sure if my code is looking to the correct property set and cannot find much on this, any help would be appreciated. (I am currently in the debugging stage to find the property and I am new to iLogic coding hence not adding the name change part yet)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Running while searching for "Panel ID")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joe_lovegunn_0-1714580844761.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1357149i88E78DFC9A3352FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joe_lovegunn_0-1714580844761.png" alt="joe_lovegunn_0-1714580844761.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(Running while searching for "Author")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joe_lovegunn_1-1714580902745.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1357150i18D157A210DDD1F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joe_lovegunn_1-1714580902745.png" alt="joe_lovegunn_1-1714580902745.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(IProperties on Assembly "11366-H2557")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joe_lovegunn_2-1714581021710.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1357151i745517EE8289637F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joe_lovegunn_2-1714581021710.png" alt="joe_lovegunn_2-1714581021710.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joe_lovegunn_3-1714581025354.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1357152iFB110298C7B4ECFE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joe_lovegunn_3-1714581025354.png" alt="joe_lovegunn_3-1714581025354.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code will be linked below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 16:30:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12746442#M166855</guid>
      <dc:creator>joe_love-gunn</dc:creator>
      <dc:date>2024-05-01T16:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to pull a custom iProperty from a main view in a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12746444#M166856</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;' Get the current drawing document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;' Loop through all the sheets in the drawing&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;sheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;
    &lt;SPAN&gt;' Get the first view on the sheet&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;view&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingView&lt;/SPAN&gt; = &lt;SPAN&gt;Sheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingViews&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)

    &lt;SPAN&gt;' Check if the view exists&lt;/SPAN&gt;
    &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;view&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
        &lt;SPAN&gt;' Print the name of the sheet being checked&lt;/SPAN&gt;
        &lt;SPAN&gt;Debug&lt;/SPAN&gt;.&lt;SPAN&gt;Print&lt;/SPAN&gt;(&lt;SPAN&gt;"Checking sheet: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;Sheet&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;)

        &lt;SPAN&gt;' Get the associated model&lt;/SPAN&gt;
        &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;model&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Document&lt;/SPAN&gt; = &lt;SPAN&gt;view&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocumentDescriptor&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocument&lt;/SPAN&gt;

        &lt;SPAN&gt;' Check if the model exists and has the desired iProperty&lt;/SPAN&gt;
        &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;model&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
            &lt;SPAN&gt;Try&lt;/SPAN&gt;
                &lt;SPAN&gt;' Get the value of the desired iProperty (replace "CustomProperty" with your actual iProperty name)&lt;/SPAN&gt;
                &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;customPropertyValue&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;model&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Inventor Summary Information"&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Panel ID"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;

                &lt;SPAN&gt;' Output the value of the iProperty&lt;/SPAN&gt;
                &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"The value of the custom property is: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;customPropertyValue&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbCrLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"Checked on sheet: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;Sheet&lt;/SPAN&gt;.&lt;SPAN&gt;Name&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;' Handle the case where the property doesn't exist&lt;/SPAN&gt;
                &lt;SPAN&gt;' You can add your custom error handling here&lt;/SPAN&gt;
                &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"The desired iProperty does not exist in the model."&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;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 May 2024 16:32:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12746444#M166856</guid>
      <dc:creator>joe_love-gunn</dc:creator>
      <dc:date>2024-05-01T16:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to pull a custom iProperty from a main view in a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12746518#M166857</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15202384"&gt;@joe_love-gunn&lt;/a&gt;.&amp;nbsp; There are always at least 4 PropertySets in every document, but some may have more than that.&amp;nbsp; The fourth PropertySet is always the 'custom' one.&amp;nbsp; It will always exist, but it will not have properties in it, by default, until you add some into it, one way or another.&amp;nbsp; The name of that PropertySet is "Inventor User Defined Properties" (in English), and its 'InternalName" is "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", which will work in all languages.&amp;nbsp; I usually just specify PropertySets.Item(4) though, because it is always at that Index position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first 3 PropertySets are a fixed size, so we can not add more Properties into them, or remove any properties from them.&amp;nbsp; And only some of those properties are Read/Write, while many are ReadOnly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached a PDF of an Excel sheet I created, which shows all all the 'standard' PropertySets &amp;amp; Properties, but also shows a coupe of the others (not all possible others though).&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 17:02:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12746518#M166857</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-05-01T17:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to pull a custom iProperty from a main view in a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12747596#M166886</link>
      <description>&lt;P&gt;That worked perfectly thank you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joe_lovegunn_0-1714634452369.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1357339i87E431CD36BE7F5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joe_lovegunn_0-1714634452369.png" alt="joe_lovegunn_0-1714634452369.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 07:20:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/trying-to-pull-a-custom-iproperty-from-a-main-view-in-a-drawing/m-p/12747596#M166886</guid>
      <dc:creator>joe_love-gunn</dc:creator>
      <dc:date>2024-05-02T07:20:59Z</dc:date>
    </item>
  </channel>
</rss>

