Model.CE_ReadXmlString#

Model.CE_ReadXmlString(string, reserved1, reserved2)#

Creates a connector from an XML string.

Parameters:
  • string (hwString) – The string containing the XML connector definition.

  • reserved1 (int) – Reserved for future development. Must be set to 0.

  • reserved2 (int) – Reserved for future development. Must be set to 0.

Example#

Create a connector from an XML string#
import hm

model = hm.Model()

model.CE_ReadXmlString(
    string="<CE_Connectors><CE_Link_List NumberOfLinks="2"><CE_Link Type="comps" Id="1" Rule="none" State="elems" /><CE_Link Type="comps" Id="2" Rule="none" State="elems" /></CE_Link_List><CE_Spot Id="1"><Location><Cords>8.514332 0.150252 0.000000</Cords></Location><CE_Detail CompID="2" CompName="bottom_square" Thickness="2" /><FE_Detail Config="rigid" Tolerance="7.000000" FESolver="0" System="0" Connectivity="0" Nonnormal="0" /><CE_Metadata_List><CE_Metadata Type="Int" Name="ce_fe_acm_numhexa" Value="1" /><CE_Metadata Type="String" Name="ce_comp" Value="bottom_square" /></CE_Metadata_List></CE_Spot></CE_Connectors>",
    reserved1=0,
    reserved2=0
)