2010-08-05 06:48 PM
2010-08-06 12:20 PM
2010-08-06 02:24 PM
2010-08-06 02:41 PM
2010-08-06 02:50 PM
2010-08-06 03:19 PM
2010-08-10 11:58 AM
2011-01-05 11:10 PM
ztaskai wrote:Thanks for this, Barry and Zsolt. But, what a pain...
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'.
This method works in v14 but I'm not sure about v13.
Regs,
2011-01-06 09:47 AM
binmode INFILE; my $fileContent = <INFILE>; close (INFILE); if ($fileContent =~ /<Ancestry[^>]+Template="no"[^>]*>/) { @lines = split (/\n/, $fileContent); @lines = map {$_ = $_ . "\n"} @lines; $/ = $irs; if (!(open (OUTFILE, '>' , $origname))) { print $logFileHandle "Error: Unable to write $origname. Skipping.\n"; return; } select(OUTFILE); binmode OUTFILE; foreach $_ (@lines) { if (m/<Symbol([^>]+)UNID="\{[^\}]+\}-([^\"]+)"(.*)/i) { print "<Symbol$1UNID=\"$2-$2\"$3\n"; } else { print ("$_"); } } close(OUTFILE); select (STDOUT); print ".$origname...\n"; }I also attached a full Perl script changin the IDs of a folder of XML fomat library parts.