the Ruby script plcslib\etc\Magicdraw\to_cxmi.rb fails when generating the image map when in a Instance block diagram we are using instance block from another module:
The error is in between lines: 214 -> 219
when 'InstanceSpecification'
compNode = Nokogiri::XML::Node.new("instance", imagexml)
xmiidref = component.xpath('elementID').first['idref'].to_s
instanceNode = inxml.xpath('//packagedElement[@xmi:id="' + xmiidref + '"]').first
compNode['name'] = instanceNode['name'].to_s
compNode['href'] = instanceNode.xpath('classifier').first['href'].to_s
those line assume to find an idref but the XMI looks like the following (href instead) when dropping instances from another MD module:
<mdElement elementClass='InstanceSpecification' xmi:id='_17_0_1_af502cf_1343042867536_883797_15851'>
<elementID xmi:type='uml:InstanceSpecification' href='CrescendoBDACommon.mdxml#_17_0_1_af502cf_1343042869423_872182_15852'/>
<geometry>42, 35, 378, 60</geometry>
<compartment compartmentID='TAGGED_VALUES'/>
</mdElement>
in this case the instanceNode variable is nil !
Checking in to_cxmi.rb;
/cvsroot/plcslib/plcslib/etc/Magicdraw/to_cxmi.rb,v <-- to_cxmi.rb
new revision: 1.21; previous revision: 1.20
done