Book a Demo

Author Topic: Copy default shape of block to generated parts  (Read 3441 times)

Mercurius

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Copy default shape of block to generated parts
« on: June 01, 2022, 03:06:31 am »
Hello All,

I would like that a defined default image or shape of a block (class) is also automatically applied to the parts (objects) generated from that block. Is that possible?

I have done the following:
  • Defined a new stereotype (extending "class", generalizing "SysML1.4::block", with an indivdual ShapeScript)
  • Created and activated an MDG including this stereotype
  • Build a BlockDefinitionDiagram with a block of the new type (-> The Shape appears as desired.)
  • Connected the block via a "part association" to a parent block (-> The "part"/"object" is generated as desired.)
  • Added an internal block diagram (IBD) of the parent block

Now the Part in the IBD appears in the standard way. But I would like to see the shape defined for the original block/class.

Can anybody help? Thanks in advance.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Copy default shape of block to generated parts
« Reply #1 on: June 03, 2022, 08:09:48 am »
You will need to define a stereotype that extends Part that also has a shape script. Also set the _instanceType of the Class stereotype to the Part stereotype (search help for 'instanceType' for details)
The Sparx Team
[email protected]

Mercurius

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Copy default shape of block to generated parts
« Reply #2 on: June 05, 2022, 02:36:29 am »
Cool. It worked. Thank you a lot, KP.  :)