Skip to main content
1-Visitor
August 21, 2018
Question

Replace the model in drawing using Jlink

  • August 21, 2018
  • 1 reply
  • 1704 views

How to replace the model of same family member in drawing?

How to convert an instance into a model using Jlink APIs, so that I can replace?

 

In a drawing(.drw), I want to replace the drawing model with another model(instance) of same family using Jlink APIs. How to proceed?

Thanks in advance.

1 reply

RPN
18-Opal
August 22, 2018

The method pfcModel2D.Model2D.ReplaceModel replaces a model in the drawing with a related model (the relationship should be by family table or interchange assembly). It allows you to replace models that are shown in drawing views and regenerates the view.

 

Similarly, the method pfcFamily.FamilyTableRow.CreateInstance returns an instance model created from the information stored in the FamilyTableRow object.

 

In tcl Smiley Happy

ps_draw replace srcMdl tarMdl ?unrepresent_ok?