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 - Plonka

Pages: [1]
1
Hello,
If you want to use the QuickLinker, you must connect your elements in your MDG with your stereotyped connectors or with the standard connectors. The connectors will then also appear in the QuickLinker. However, this then no longer has anything to do with simple recreation ;D

In order to have my own toolboxes and some standard toolboxes, I have created a personal perspective.
Click on Perspective selection -> Settings -> Personal Sets -> New
Now you can add toolboxes and then simply switch between the toolboxes. Of course, the toolboxes do not open automatically when you open a diagram, but it saves a lot of time if you have to switch back and forth between a few toolboxes.

Hope that helps someone.

2
Hello,
I have a problem using shape script.
I extend the dependency connector in my MDG. Everything works fine but i can not make a subshape run in the target shape.
Target is a fixed name for the shape that creates the arrowhead of a connector. At least thats what I understand.
When entering the code below in the Shape Editor, the shape is displayed as i expected.

But when using my MDG the desired black circle is not visible.
When I copy the code from addsubshape("Circle",....) including the whole shape circle {...} the circle is shown.

What am i missing?  Could it be the sizing of the subshape? Tried to handle that by making the sub shape (100,100) big.
(How the Coordinates, widths and heights work is still a miracle to me)

Kind regards
Plonka



Code: [Select]
shape main
{
// Defines the normal line of the arrow
layouttype="topdown"; // <- needed here ?
noshadow=true;
//setpen(getDefaultLineColor()); // <- Don`t know of this works.
setlinestyle("solid");
moveto(0,0);
lineto(100,0);

//  ***When i put the subshape here, the Circle appears (random) on the connector line***
// addsubshape("circle",100,100,0,0);

// shape circle // defines a small Circle on the tip of the arrowhead -> does not work
// {
// scalable = false;
// rotatable = true;
// setpen(0,0,0,1);
// setfillcolor(0,0,0);
// startpath();
// ellipse(0,-5,10,5);
// endpath();
// fillandstrokepath();
// }
//
}

shape target // Defines the Arrowhead
{
layouttype="topdown"; // <- needed here ?
rotatable = true;
startpath();
moveto(0,0);
lineto(16,6);
moveto(0,0);
lineto(16,-6);
endpath();
strokepath();

// ***If I draw the circle here, it works fine***
// setpen(0,0,0,1);
// setfillcolor(0,0,0);
// startpath();
// ellipse(0,-5,10,5);
// endpath();
// fillandstrokepath();


addsubshape("circle",100,100,0,0);

shape circle // defines a small Circle on the tip of the arrowhead -> does not work
{
scalable = false;
rotatable = true;
setpen(0,0,0,1);
setfillcolor(0,0,0);
startpath();
ellipse(0,-5,10,5);
endpath();
fillandstrokepath();
}
}

3
Automation Interface, Add-Ins and Tools / Re: Custom Metamodel Diagram View
« on: February 28, 2025, 07:10:37 pm »
Ah thanks!
That makes sense.
One problem less on my list.

4
Automation Interface, Add-Ins and Tools / Re: Custom Metamodel Diagram View
« on: February 27, 2025, 08:03:31 pm »
Thanks Takeshi,

I found this Link: https://sparxsystems.com/enterprise_architect_user_guide/17.0/add-ins___scripting/javascrip_console_the.html

The commands are working for a SysML Block Element I selected in the tree

currentElement = Repository.GetTreeSelectedObject()
Session.Output("Selected ElementID: "+currentElement.ElementID)
->Selected ElementID: 12


But this does not work for diagrams I select in the browser tree.

And I can not find the diagram ID. Only the GUID but this is the wrong one.

Maybe you know where I am wrong or what I am misssing.

Kind regards

Plonka


5
Automation Interface, Add-Ins and Tools / Re: Custom Metamodel Diagram View
« on: February 27, 2025, 02:58:26 am »
Can someone please explain how this works? 
I opend a diagram and then went to Specialize -> Tools -> JavaScript and entered the command.
Result was: GetCurrentDiagram(...) is undefined.
I think I need to define which Diagram I want the Metatype from but I don't know how...


Both parts of the name you have used there are the "friendly" names. The actual id is SysML1.4::InternalBlock.

PS. The linked help includes the following hint to find the id to use for non-uml diagrams.

Quote
Note: If you do not know the fully qualified name of the diagram type you are extending, query the API to get the 'Metatype' field. In a Javascript console you can use:
?GetCurrentDiagram().MetaType

6
Hello all,

I know this post is very old but would you tell me where to paste the given Code ?
I really dont know where to start here but I want to know the Database Name of my current Project, too and want to use the Code.

Thank you very much and Happy New Year 2025 :D

7
Bugs and Issues / Re: Lock aspect ratio when resizing an image element
« on: December 18, 2024, 10:16:07 pm »
edit\
Well...found the solution.
I had some other commands befor "fixedAspectRatio = "true";".
In the Guide it is written that it should be befor drawing commands. Thats why it didn't work in the first place.
\edit

For Images pressing SHIFT works, thank you for that!
In shape script I can not make it work.
From the MDG Guide I assume that it should look like this:

shape main
{
       fixedAspectRatio = "true";
       DrawNativeShape();
}

Am I right or is there something I got wrong.

Kind Regards

(I know I could open a new topic but I think it is usefull to have the solution here)

8
General Board / Re: Extend SysML with MDG Technology in EA
« on: October 22, 2024, 11:29:36 pm »
That looks better, thank you.
Next step would be to change the appearance with Shape Script.
I want the new Block to look like a SysML Block but slightly different when some attributes have a specific value.
I managed to this in general but there is no source code for the SysML Block shape script or the UML Class element.

9
General Board / Re: Extend SysML with MDG Technology in EA
« on: October 22, 2024, 10:28:40 pm »
«metaclass»
Name: Class
Type: Class
Stereotype: UML Standard Profile::Metaclass

«Block»
Name: Block 1
Type: Block
Stereotype: SysML 1.5::block

My new Block is a Stereotype element of the Toolbox "Profile"

Name: New Block
Type: Class
Stereotype: Stereotype

New Block --- Generalization ---> «Block»
New Block --- Extension ---> «metaclass»

I dont know where to "fill" the metatype field because there is no field in my New Block.

(I wish this forum would allow to add screenshots  ;D)

10
General Board / Re: Extend SysML with MDG Technology in EA
« on: October 22, 2024, 08:42:39 pm »
When I extend the «metaclass» class and generalize a «block» in my Profile, the new Element in my new Element is from type Class and not Block.
How can I change this?
My new Block should behave and look exactly like a SysML Block but I want to extend with some attributes.
Any ideas?

11
General Board / Extend SysML with MDG Technology in EA
« on: September 26, 2024, 01:28:44 am »
Hello all,

I simply want to extend the SysML 1.5 TestCase.

Lets say I want to have in the Properties a new Attribut that let me choose if the TestCase is executed or not.

My approach is the following:
1. Create a new projekt: Start Page->Create from Pattern-> MDG Technology Builder
2. In the <<profile>> Package I added the SysML 1.5::testCase
3. I added a stereotype (extendedTestCase) and added the attribut "Status"
4. I created an enumeration (EnumStatus) and added the attributs "executed" and "not executed".
5. The type of the attribut "Status" selected as EnumStatus
6. I connected the "extendedTestCase" and the "SysML 1.5::testCase" with an Extension connector

Later I exported the <<profile>> Package to an xml file which I later choose when generating the MDG-Technologie.

I kind of have the feeling that I can not simply extend a SysML Stereotype. I can integrate my Technology into my project but I can not find the "extendetTestCase".

Are there any good instructions on how to extend sysml elements in EA?
A Youtube video or a webpage oder something I can find in this Forum. I was not able to find anything reasonable.

Hope somebody can help.

Kind regards
J. Plonka

12
General Board / Re: Navigation Cells and custom images #2
« on: August 08, 2024, 06:05:08 pm »
Thank you Sunshine  8)

It worked. For all other users, here is a more detailed description of how it is done (V16.1):

  • Drag and drob an image file from the windows explorer into a Diagram in EA
  • EA asks you, how to store the Image. Choose Image Asset
  • Now the Image is in the diagram and the Project Browser
  • Delete it from the diagram by right click -> delete
  • Now you can drag the Image from the Projekt Browser and drop it on the Navigation Cell
  • EA asks you how to insert the Image. Choose Set as Alternate Image

Done.

Im sure there is a way to not drop it into the diagram first but it worked for me for the moment.
Thanks again and I wish you a sunny day  8)

13
General Board / Navigation Cells and custom images #2
« on: August 07, 2024, 05:03:22 pm »
Hello everybody,

as i4mdone asked in 2020, i would like to use my own images in navigation cells.
Is there now a way to realize this?

Kind regards

A suggestion regarding Navigation Cells and Images: it would be very handy if you could select Navigation Cell images from the Image Manager.  While the supplied images are actually quite good, I have several use cases where using custom images to match various concepts would be quite useful.

(maybe someone can tell me there is a way to do this and I just don't know how)

14
Hello everyone,

I am struggling to list all diagrams of a package in a Package Diagram.
Let me explain it step by step because I am not able to insert an image:

  • I created a Package "Test" in the Project Browser
  • to this package I added a SysML BDD
  • to the BDD I added a SysML Block
  • I also added another package to the "Test"-Package

In a SysML Package Diagram I want to show all elements contained by the package "Test".
  • drag "Test" from the Browser in the Package diagram
  • choose Package Element
  • right-click on the Package element "Test" in the Diagram
  • choose "Compartment Visibility"
  • activate the checkbox "package Contents"

Now only the Package and the Block are listed in the Package Element "Test" in the Diagram.
Why is the BDD missing? This applies to all kinds of diagrams.

How can I make Diagrams visible in the Package Element?

Many thanks in advance for your help.

Regards
Plonka

Pages: [1]