<?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 API Newbie - Family 'Signature' functionality in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/api-newbie-family-signature-functionality/m-p/3588662#M80559</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a very green beginner working my way through the Introduction to the Revit API. I have a little bit of programming experience (dangerous! - Does Commodore 64 BASIC count?) so I have some ideas about how I might go about what I want to acheive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly - are there any API plugins out there that do what I want to do? (I haven't seen any, so I'm asking here)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Goal:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A 'signature' field within a family / family:type that shows the family is 'official'.&lt;/LI&gt;&lt;LI&gt;This field should be something like a concatenation of the %username% from Windows and the current Date.&lt;/LI&gt;&lt;LI&gt;The field should ONLY be updated by an API command - ie, something you click on the Ribbon.&lt;/LI&gt;&lt;LI&gt;This API command is&amp;nbsp; only visible for certain users (me in this case!) - easy to do, don't install the plugin on workstations that dont need it&lt;/LI&gt;&lt;LI&gt;The field should be invisible to un-blessed users&lt;/LI&gt;&lt;LI&gt;The field should be active for a view filter - so you can create a view with 'un-blessed' (unsigned) families shaded in colour to highlight them&lt;/LI&gt;&lt;LI&gt;The field should be BLANK if a user edits any family in any way - even a previously 'blessed' family&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;We're not trying to track who is creating crap families (we know who they are, anyway) we are just trying to sift the wheat from the chaff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can think of ways to do items 1-4 that are not much beyond what you can do 'by hand' with a Shared Parameter.&lt;/P&gt;&lt;P&gt;Point 5 makes me think the Data Storage Object might be the way to go...&lt;/P&gt;&lt;P&gt;Point 6 - this would likely have to be a purely API thing - check for DSO from point 5, apply shade-by-element in a new view.&lt;/P&gt;&lt;P&gt;Point 7 - this is what stumps me. I can't think of a way to do this except a 'silent' API function that captures an 'un-blessed' user performing a family edit (which in itself is a bit tricky to define) and clearing the DSO field (if it exists).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a bit hesitant to use an API function like that due to my low skill level; 'script-like' functions I think I can cope with, but 'triggered' functions make me feel like I&amp;nbsp;am treading in far deeper water...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some alternative to the above I have thought of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using GUIDs - are the Revit GUIDs based on a trackable seed (such as MAC address) that could be filtered? Would any family edit result in an 'unblessed' GUID being inserted into the family?&lt;/LI&gt;&lt;LI&gt;Lockable Family Parameters - that vanish on edit if not done by a 'blessed' user?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;We have currently implemented a system of putting hashed MD5 keys into the Type Comments field of each family, generated from a concatenation of family:typename:salt. This is entirely manual, with family:typenames exported, converteed to Excel, hashed, copied by hand back into families. The checking process is similar - export family:typename, import to Excel, compare MD5 key saved with family to 'correct' MD5 key - a mismatch indicates a high probablity of a user-created family. Users aren't going to know how to generate a valid MD5 key, as I 'salt' the keys with another secret value as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works, to a point - if the user modifies a family:type but leaves the typename unchanged edits can slip through&amp;nbsp; - but mostly this process works, as most people seem to do a 'duplicate type' which results in a family:typename1 which then fails the MD5 check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that this entire process is&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;tedious&lt;/LI&gt;&lt;LI&gt;boring&lt;/LI&gt;&lt;LI&gt;difficult&lt;/LI&gt;&lt;LI&gt;imprecise&lt;/LI&gt;&lt;LI&gt;all of the above.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The API seems to be the way to go, but it's a big step to learn it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, we have a library of 4,500 objects we are trying to maintain which is why user-created itmes are such a big problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have thought about completely disabling the ability to create/edit families but that seems a little bit too restrictive, and besides that we do (oddly enough) allow in-place families - they are easy to spot and filter out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions, or is there an App put there that does all this for me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Aug 2012 00:45:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-08-21T00:45:36Z</dc:date>
    <item>
      <title>API Newbie - Family 'Signature' functionality</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/api-newbie-family-signature-functionality/m-p/3588662#M80559</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a very green beginner working my way through the Introduction to the Revit API. I have a little bit of programming experience (dangerous! - Does Commodore 64 BASIC count?) so I have some ideas about how I might go about what I want to acheive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly - are there any API plugins out there that do what I want to do? (I haven't seen any, so I'm asking here)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Goal:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;A 'signature' field within a family / family:type that shows the family is 'official'.&lt;/LI&gt;&lt;LI&gt;This field should be something like a concatenation of the %username% from Windows and the current Date.&lt;/LI&gt;&lt;LI&gt;The field should ONLY be updated by an API command - ie, something you click on the Ribbon.&lt;/LI&gt;&lt;LI&gt;This API command is&amp;nbsp; only visible for certain users (me in this case!) - easy to do, don't install the plugin on workstations that dont need it&lt;/LI&gt;&lt;LI&gt;The field should be invisible to un-blessed users&lt;/LI&gt;&lt;LI&gt;The field should be active for a view filter - so you can create a view with 'un-blessed' (unsigned) families shaded in colour to highlight them&lt;/LI&gt;&lt;LI&gt;The field should be BLANK if a user edits any family in any way - even a previously 'blessed' family&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;We're not trying to track who is creating crap families (we know who they are, anyway) we are just trying to sift the wheat from the chaff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can think of ways to do items 1-4 that are not much beyond what you can do 'by hand' with a Shared Parameter.&lt;/P&gt;&lt;P&gt;Point 5 makes me think the Data Storage Object might be the way to go...&lt;/P&gt;&lt;P&gt;Point 6 - this would likely have to be a purely API thing - check for DSO from point 5, apply shade-by-element in a new view.&lt;/P&gt;&lt;P&gt;Point 7 - this is what stumps me. I can't think of a way to do this except a 'silent' API function that captures an 'un-blessed' user performing a family edit (which in itself is a bit tricky to define) and clearing the DSO field (if it exists).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a bit hesitant to use an API function like that due to my low skill level; 'script-like' functions I think I can cope with, but 'triggered' functions make me feel like I&amp;nbsp;am treading in far deeper water...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some alternative to the above I have thought of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using GUIDs - are the Revit GUIDs based on a trackable seed (such as MAC address) that could be filtered? Would any family edit result in an 'unblessed' GUID being inserted into the family?&lt;/LI&gt;&lt;LI&gt;Lockable Family Parameters - that vanish on edit if not done by a 'blessed' user?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;We have currently implemented a system of putting hashed MD5 keys into the Type Comments field of each family, generated from a concatenation of family:typename:salt. This is entirely manual, with family:typenames exported, converteed to Excel, hashed, copied by hand back into families. The checking process is similar - export family:typename, import to Excel, compare MD5 key saved with family to 'correct' MD5 key - a mismatch indicates a high probablity of a user-created family. Users aren't going to know how to generate a valid MD5 key, as I 'salt' the keys with another secret value as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works, to a point - if the user modifies a family:type but leaves the typename unchanged edits can slip through&amp;nbsp; - but mostly this process works, as most people seem to do a 'duplicate type' which results in a family:typename1 which then fails the MD5 check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that this entire process is&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;tedious&lt;/LI&gt;&lt;LI&gt;boring&lt;/LI&gt;&lt;LI&gt;difficult&lt;/LI&gt;&lt;LI&gt;imprecise&lt;/LI&gt;&lt;LI&gt;all of the above.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The API seems to be the way to go, but it's a big step to learn it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, we have a library of 4,500 objects we are trying to maintain which is why user-created itmes are such a big problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have thought about completely disabling the ability to create/edit families but that seems a little bit too restrictive, and besides that we do (oddly enough) allow in-place families - they are easy to spot and filter out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions, or is there an App put there that does all this for me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2012 00:45:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/api-newbie-family-signature-functionality/m-p/3588662#M80559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-21T00:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: API Newbie - Family 'Signature' functionality</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/api-newbie-family-signature-functionality/m-p/3592384#M80560</link>
      <description>&lt;P&gt;Dear &lt;SPAN class="UserName lia-user-name"&gt;&lt;A id="link_13953015512" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1076488" target="_self"&gt;&lt;SPAN&gt;aesdaile.w&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please take a long and deep look at the ample getting started material, and then come back and ask again:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2012/07/obj-model-exporter-with-transparency-support.html#4" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2012/07/obj-model-exporter-with-transparency-support.html#4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2012 10:24:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/api-newbie-family-signature-functionality/m-p/3592384#M80560</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2012-08-23T10:24:54Z</dc:date>
    </item>
  </channel>
</rss>

