Book a Demo

Author Topic: Ports on part properties  (Read 3062 times)

rmsimmons

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Ports on part properties
« on: April 23, 2020, 07:28:50 am »
I've used the API to build a model with part properties on blocks, where each part property type (sub-block type) typically has a (standard) port.  When I click on such a part property in the GUI, the Features window (Interaction Points) shows the inherited port(s) with the Owner column showing the part's PropertyType.  Dumping the model through an Excel VBA utility, those ports don't seem to actually exist in <part>.Elements until I check the Features box, after which both <part>.Elements and <block>.Elements include the port element.

I actually want to use the API to create connectors between the ports on those parts, so I want to use the API to make part properties inherit ports the same way that the GUI does when I check the box in the Features window.  I tried adding the same port (name) to the part property, and it does that, but the Features window then shows two ports, one with a blank Owner and one with the correct Owner.

Should I be using a Part Association between the containing block and its sub-blocks, after which will EA automatically create the part properties and ports?  Or is there a way to use the API to set the port owner explicitly?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Ports on part properties
« Reply #1 on: April 23, 2020, 05:03:34 pm »
I think this is done via the classifier property.

q.