Page 1 of 1

Custom Interface Control Document

PostPosted: Fri May 24, 2019 12:33 pm
by Patzz0r
Good Afternoon,

I am looking to create a custom report template that outlines internal interfaces (IE connectors and their pins). I created the diagrams but am having trouble understanding how to create the custom template for the element items I need. I know I need to use $foreach to recursively grab all the elements in the package. In my IBD I need the following elements from the Part Properties:

1. Name (In the general Specification table)
2. Type (In the general Specification table)
3. Connectors (This is the Connectors section of the Part Property
3. Applied Stereotype (I created a custom stereotype called "connector")
4. Inner Element --> Body (This is the description of the connector)
5. Inner Element --> Image (Image of the mechanical drawing of the connector.

I also made a package called "Connector Information" and I believe I need to use that as my Scope.

I appreciate any help!

Re: Custom Interface Control Document

PostPosted: Wed May 29, 2019 12:28 pm
by Patzz0r
After a bit of scouring the internet and trial and error I came up with this code. However I am only getting the diagram name and picture to come up. So basically the first 4 lines of code work:

Code: Select all
#foreach ($diagram in $Diagram)
#if ($diagram.diagramType == “SysML Internal Block Diagram”)
#foreach ($pp in $report.filterElement($b.ownedAttribute, [“Part Property”]))
Part Name   $
Part Type   $pp.type
#forrow ($att in $pp.attribute) $   $
Description   $pp.body
Connector Image   $pp.image
Connections   $pp.connectors

I found a post from 2011 about part and value properties but I am only getting the diagram name and picture to come up. Am I calling everything correctly?