Integrations (PTC products, 3rd party products and code) > 3rd party product integrations (CM, DOORS, Rose, Simulink and XML) > Integration for MATLAB Simulink > Working with internal block diagrams > Exporting an internal block diagram to a Simulink model (Integration for MATLAB Simulink)
  
Exporting an internal block diagram to a Simulink model (Integration for MATLAB Simulink)
1. If you have not done so already, add the Simulink profile to the Modeler model. How?
2. If you want to export Flow Ports, Full Ports and Proxy Ports that appear on the Internal Block Diagram, ensure that those Flow Ports, Full Ports and Proxy Ports appear on an Internal Block Diagram that is owned by their owning Part's type. How?
3. In Modeler, open the Internal Block Diagram you want to export.
4. Right-click the background of the Internal Block Diagram, point to Tools, point to Simulink Synchronizer, and then click Synchronize.
5. Set the options on each page of Integration for MATLAB Simulink as required.
For information about the options that appear on a page of Integration for MATLAB Simulink, click the Help button.
If you are updating a Simulink model from a previously exported Internal Block Diagram, on the Mapping List page, select the Integration for MATLAB Simulink Mapping you used to previously export that Internal Block Diagram.
If you are exporting the Internal Block Diagram the first time, on the Target Selection page, select an empty Simulink model or create a new Simulink model.
On the Target Selection page, select the Modeler -> Simulink option.
On the Item Mapping Definitions page, ensure that the Flow Ports, Full Ports and Proxy Ports you want to export are listed (see Step 2), and set up each Part to be exported as a SubSystem or ModelReference.
If on the Item Mapping Definitions page an icon indicates that an object has changed in the Simulink model (for example or ), confirm that it is acceptable for the export to overwrite those changes.
If in future you want to be able to quickly update the exported Simulink model with any changes you make to the Modeler model, on the Save and Synchronize page click the Save and Synchronize button.
A Part (Block Property) can be exported as a ModelReference only when the Part's type owns an Internal Block Diagram or Parametric Diagram. If a Part does not own an Internal Block Diagram (IBD) or Parametric Diagram on the Item Mapping Definitions page, Integration for MATLAB Simulink sets the Simulink type for that Part to SubSystem so that the Part is exported, irrespective of the default mapping.
Integration for MATLAB Simulink exports the Internal Block Diagram to the Simulink model.