Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - maaroe

Pages: [1]
1
@mse
Glad to hear it helped :)

2
My - fairly inexperienced - view on this is similar to qwerty's: It really depends on what you are trying to accomplish with your model.

Typically, you would have a logical model, which would probably not have the need for describing the detailed physical part properties of a connector through the use of a fullPort.

Once the design matures you need a physical model as well, in which it may be necessary to describe the equivalent connection as a fullPort.

Then again, unless you need to actually make it very clear that you have a specific implementation of an RJ-45 (or even of an Ethernet connector), you could easily leave it as a proxyPort. There are many things, you could include in your model, but it does not make sense to do so because of the little value it brings. The cables could be blocks as well, as could the individual wires so you can specify wire gauge and color in the model - but this is rarely a good way to spend your time as a system designer.

3
Hi,

I'm fairly new to EA scripting and particularly the API/datamodel although I've done my fair share of software development.

My goal is to create a script Project Browser script, that takes the selected SysML::Block object in the project browser and recursively extracts the Parts in the structure into a CSV file.

Example:
A BDD is created establishing the below hierarchical structure using "Composition to Whole" links between SysML::Block elements on the diagram.

Block A (selected)
  - Part x
  - Part y
  - Part z
    - Part z1
    - Part z2

Question 1:
How do I extract this information into a CSV file with the structure described below?
--------------------------
Level   Name   Parent
0         A
1         x         A
1         y         A
1         z         A
2         z1       z
2         z2       z

I've tried starting from Block A and iterating through all of the "Part" Elements in the EmbeddedElements Collection and extracting the Part.PropertyTypeName for each Part in the collection. This works well for level 1. Then the idea was to iterate through each Element in the Part.EmbeddedElements and so on until reaching the Parts with empty EmbeddedElements Collections. However, all the Parts in Level 1 have empty EmbeddedElements Collections even though they are defined identically in the BDD diagram, so the script stops at level 1.

Question 2:
I would want to add metadata to the Blocks/Parts and have that exported in relevant columns as well. For now the list of columns is predefined, so there is no dynamic creation of new columns or similar.
But I run into the same type of problem here. The top-level Block has an Attribute (e.g. "PartNo" = "testPartNo") which is found by the script and exported in the array structure that will eventually be saved to a CSV file. But all of the members of the EmbeddedElements Collection (which have Type = "Part" rather than "Block"... because they are instances(?)) have empty Attributes Collections, even though the Block definitions from which the instances where created have Attributes defined.

In the end, I want to use something similar to walk through the BDD tree and aggregate Mass value properties to get total weight etc, so I will also need to get Multiplicity involved (another parameter that eludes extraction from Parts), but for now I would be happy with the above.

So maybe it is actually a single question:
When a Block becomes a Part due to the composition to whole relationship, where do the Collections of EmbeddedElements and Attributes go?
I can see, that the Name goes into PropertyTypeName, but where does the rest go?

It seems like a fairly obvious thing to want to export for use in other tools (like a PLM system) or for reporting...

Thanks in advance (I've been trying to find a solution to this for the entire day but no progress).

// Morten

PS:
I have some simple screendumps of the BDD and project browser, but how do I include them in the post?

4
Some tasks in EA are quite repetitive and seem like they could be improved.

One thing, I've come across is adding (many) ports to SysML Blocks. Currently, this seems to consist of dragging a Port from the Toolbox to the block in either the Explorer or in a diagram view.

Is there a way to easily add, say, 10 ports to a block?

I'm thinking something along the lines of a table editor so I can specify the port name as well, but I'm sure people with better UX understanding could imagine other solutions, so maybe something already exists.

Similarly, a quick way of making associations between blocks and sub-blocks would be useful rather than simply using the mouse. If you have 20 blocks and all have to have a "Composition to Whole" association to a parent block, doing it by mouse dragging the arrow cursor and then choosing the association type each time seems slower than needed.

5
I've tried searching for similar topics in the board, but I haven't been able to find any. If they exist, I'm sorry for that...

When I open an IBD which has both external ports and internal parts/blocks with ports, every modification of the layout (like moving a port - internal or external - or an internal block), the all of the internal blocks move to the right and a bit down. This repeats for every layout modification - including when trying to move them back - until the IBD frame reaches the maximum size. Naturally, this is fairly annoying.

Did I somehow set up EA incorrectly or is this a known bug? And is it fixed in v. 16.0?

Any help would be much appreciated.

Pages: [1]