<?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 edit the GUID in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186289#M19876</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi to all,&lt;BR /&gt;
is it possible in someway overwrite the GUID?&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 Aug 2010 16:48:48 GMT</pubDate>
    <dc:creator>alemanda</dc:creator>
    <dc:date>2010-08-05T16:48:48Z</dc:date>
    <item>
      <title>edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186289#M19876</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi to all,&lt;BR /&gt;
is it possible in someway overwrite the GUID?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Aug 2010 16:48:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186289#M19876</guid>
      <dc:creator>alemanda</dc:creator>
      <dc:date>2010-08-05T16:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186290#M19877</link>
      <description>I believe the GUID is automatically assigned to library pats by ArchiCAD when they are created.&lt;BR /&gt;
So I think it is not possible.&lt;BR /&gt;
&lt;BR /&gt;
I don't know if it is possible using API or not.</description>
      <pubDate>Fri, 06 Aug 2010 10:20:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186290#M19877</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2010-08-06T10:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186291#M19878</link>
      <description>I changed the GUID of a new object to the number of an excisting object, that the new one should have, so it will be recognized. &lt;BR /&gt;
This was not possible in ArchiCAD; first I converted both objects into XML files with the XML Converter, than I changed the GUID within the XML file, then converted the new object back to gsm.</description>
      <pubDate>Fri, 06 Aug 2010 12:24:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186291#M19878</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2010-08-06T12:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186292#M19879</link>
      <description>XML converter? Where can I find it?&lt;BR /&gt;
How does it wokrs?&lt;BR /&gt;
Anyway this is a very good new!!!</description>
      <pubDate>Fri, 06 Aug 2010 12:41:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186292#M19879</guid>
      <dc:creator>alemanda</dc:creator>
      <dc:date>2010-08-06T12:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186293#M19880</link>
      <description>XML Converter is a bit tricky to use, because it is a command line tool.&lt;BR /&gt;
AC 14 has it within its directory. FOR AC 13 you have to download the Library Developer Toolkit at:&lt;BR /&gt;
&lt;A href="http://www.graphisoft.com/support/developer/downloads/" target="_blank"&gt;http://www.graphisoft.com/support/developer/downloads/&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
For use of the Converter take a serach in this forum "XML Converter"</description>
      <pubDate>Fri, 06 Aug 2010 12:50:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186293#M19880</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2010-08-06T12:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186294#M19881</link>
      <description>Doing a "Save As" and giving the object a new name will change the GUID I believe.&lt;BR /&gt;
But you have no control over what it is.&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 06 Aug 2010 13:19:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186294#M19881</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2010-08-06T13:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186295#M19882</link>
      <description>As Barry told, you get a brand new MainID if you save the object to a new location via 'save as'. On the other hand, you can claim the MainID of an other object by overwriting it in 'save as'.&lt;BR /&gt;
&lt;BR /&gt;
This method works in v14 but I'm not sure about v13.&lt;BR /&gt;
&lt;BR /&gt;
Regs,</description>
      <pubDate>Tue, 10 Aug 2010 09:58:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186295#M19882</guid>
      <dc:creator>ztaskai</dc:creator>
      <dc:date>2010-08-10T09:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186296#M19883</link>
      <description>&lt;BLOCKQUOTE&gt;ztaskai wrote:&lt;BR /&gt;As Barry told, you get a brand new MainID if you save the object to a new location via 'save as'. On the other hand, you can claim the MainID of an other object by overwriting it in 'save as'.&lt;BR /&gt;
&lt;BR /&gt;
This method works in v14 but I'm not sure about v13.&lt;BR /&gt;
&lt;BR /&gt;
Regs,&lt;/BLOCKQUOTE&gt;

Thanks for this, Barry and Zsolt.  But, what a pain...&lt;BR /&gt;
&lt;BR /&gt;
I'm helping someone transition from 9 to 14 right now, and their old custom library parts reported as duplicated in the 14 lib manager.  On looking, the root GUID was identical for non-identical parts.  I wasted some time doing Save As with each part, one by one, back to the same name - only to find no improvement.&lt;BR /&gt;
&lt;BR /&gt;
How frustrating that you have to do a Save As to a NEW name to get the base GUID to change ... and then delete the original part, and optionally rename the newly named part back to the desired name... and that this must be done one, by one.&lt;BR /&gt;
&lt;BR /&gt;
Further frustrating that this migration process is not discussed anywhere in the AC 14 Help or Reference Guide, nor on the Wiki.&lt;BR /&gt;
&lt;BR /&gt;
So, rambling with a few more keywords in this post in case someone else runs into this issue and does a forum search. &lt;E&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/E&gt;&lt;BR /&gt;
&lt;BR /&gt;
Karl</description>
      <pubDate>Wed, 05 Jan 2011 22:10:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186296#M19883</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2011-01-05T22:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: edit the GUID</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186297#M19884</link>
      <description>Hi Karl,&lt;BR /&gt;
&lt;BR /&gt;
Dropping explicit controls over the GUIDs was intentional. The design tries to emphesize the nature of libpart identification. I'm confident it is more intuitive for people less experienced with objects. It is a hassle for you, of course:(&lt;BR /&gt;
&lt;BR /&gt;
I'd like to add one more thing for later finders of this thread (as it may be too late for you). If I had to give new GUID to more than 12 elements, I would convert them to XML using LP_XMLConverter. There you can make a mass-replace replacing the main part of the ID with the revision part (which just serves as a reliable new-GUID-source for the operation).&lt;BR /&gt;
&lt;BR /&gt;
In Perl it goes like this:
&lt;PRE&gt;binmode INFILE;
my $fileContent = &amp;lt;INFILE&amp;gt;;
close (INFILE);

if ($fileContent =~ /&amp;lt;Ancestry[^&amp;gt;]+Template="no"[^&amp;gt;]*&amp;gt;/) {
  @lines = split (/\n/, $fileContent);
  @lines = map {$_ = $_ . "\n"} @lines;
  $/ = $irs;

  if (!(open (OUTFILE, '&amp;gt;' , $origname))) {
    print $logFileHandle "Error: Unable to write $origname. Skipping.\n";
    return;
  }
  select(OUTFILE);
  binmode OUTFILE;
  foreach $_ (@lines) {
    if (m/&amp;lt;Symbol([^&amp;gt;]+)UNID="\{[^\}]+\}-([^\"]+)"(.*)/i) {
      print "&amp;lt;Symbol$1UNID=\"$2-$2\"$3\n";
    } else {
      print ("$_");
    }
  }
  close(OUTFILE);
  select (STDOUT);
  print ".$origname...\n";
}
&lt;/PRE&gt;

I also attached a full Perl script changin the IDs of a folder of XML fomat library parts.&lt;BR /&gt;
&lt;BR /&gt;
HTH,</description>
      <pubDate>Thu, 06 Jan 2011 08:47:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/edit-the-GUID/m-p/186297#M19884</guid>
      <dc:creator>ztaskai</dc:creator>
      <dc:date>2011-01-06T08:47:12Z</dc:date>
    </item>
  </channel>
</rss>

