<?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: Dynamic Custom iProperty in viewlabel on drawings in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/dynamic-custom-iproperty-in-viewlabel-on-drawings/m-p/13408453#M1030</link>
    <description>&lt;P&gt;For anyone finding this at a later stage, I was able to fix this by removing the PropertyID from the XML string:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PropertyID='" &amp;amp; MTOMatID &amp;amp; "'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The propertyID does not seem to be necessary to create the dynamic link, and the following is enough:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Property='" &amp;amp; materialStr &amp;amp; "'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Apr 2025 08:30:26 GMT</pubDate>
    <dc:creator>tsteegman</dc:creator>
    <dc:date>2025-04-04T08:30:26Z</dc:date>
    <item>
      <title>Dynamic Custom iProperty in viewlabel on drawings</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/dynamic-custom-iproperty-in-viewlabel-on-drawings/m-p/13403942#M1029</link>
      <description>&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating an AddIn to create views of all parts used in an assembly to my 2D. However, I'm running into an issue using dynamic custom iProperty values. The issue I'm having is referencing the actual model presented in the view, and extracting the correct iProperty from that. Since the iProperty identifiers in the other sets are the same for every part, this does not cause any issues and shows the correct proxy on the drawing, even though it's theoretically not correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, for the custom iproperty set, the identifiers differ per part/assembly, and this connects the label to non existing properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, I'm using the following the try and print &amp;lt;Material&amp;gt;, which is stored in the custom iProperties of a part. materialStr is simply the string of how it's stored in the model, and MTOMatId is the the PropID in the propertyset of the model referenced in the view.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Property Document='model' PropertySet='User Defined Properties' Property='" &amp;amp; materialStr &amp;amp; "' FormatID='{D5CDD505-2E9C-101B-9397-08002B2CF9AE}' PropertyID='" &amp;amp; MTOMatID &amp;amp; "'&amp;gt;Material&amp;lt;/Property&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example, MTOMatID is '2', and when I use that to extract the dynamic custom iProperty, and put it in the label, it references the first model put on the drawing (not even the sheet) instead. In this example that's "&amp;lt;Category&amp;gt;", which also does not exist in the model the view is referring to:&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="tsteegman_0-1743585347750.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1484721iCA02A7BFA961AD20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tsteegman_0-1743585347750.png" alt="tsteegman_0-1743585347750.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And when clicking the "&amp;lt;Category&amp;gt;", the top bar then shows:&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="tsteegman_1-1743586124038.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1484726i4660AC6613AA9E60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tsteegman_1-1743586124038.png" alt="tsteegman_1-1743586124038.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create this link dynamically and connect it to the correct model, instead of the drawing model? Also, the nature of our assemblies/parts mean the custom iProperties are used a lot, and are not always the same, so setting up the same custom iProperties for all parts in templates is not really an option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 09:29:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/dynamic-custom-iproperty-in-viewlabel-on-drawings/m-p/13403942#M1029</guid>
      <dc:creator>tsteegman</dc:creator>
      <dc:date>2025-04-02T09:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Custom iProperty in viewlabel on drawings</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/dynamic-custom-iproperty-in-viewlabel-on-drawings/m-p/13408453#M1030</link>
      <description>&lt;P&gt;For anyone finding this at a later stage, I was able to fix this by removing the PropertyID from the XML string:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PropertyID='" &amp;amp; MTOMatID &amp;amp; "'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The propertyID does not seem to be necessary to create the dynamic link, and the following is enough:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Property='" &amp;amp; materialStr &amp;amp; "'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 08:30:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/dynamic-custom-iproperty-in-viewlabel-on-drawings/m-p/13408453#M1030</guid>
      <dc:creator>tsteegman</dc:creator>
      <dc:date>2025-04-04T08:30:26Z</dc:date>
    </item>
  </channel>
</rss>

