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

Pages: 1 ... 150 151 [152] 153 154 ... 169
Does anybody know how to disable Shape Scripts based on some diagram property or custom tag?
There is a shape script command: drawNativeShape()

How to access current diagram properties in a Shape Script? No documentation found
On this page there is a list of properties you can test against in shape scripts. Look at those beginning "diagram."

Automation Interface, Add-Ins and Tools / Re: Shape script Problem
« on: August 01, 2011, 09:36:29 am »
Try this:

Code: [Select]
label middletoplabel

label middlebottomlabel
      // hide the stereotype label

Here's one way (not the only way, but it works for me):

Give your stereotype class an attribute named "_image". Click the "..." button next to the Initial Value field in the attribute's properties dialog and enter the following shape script:

Code: [Select]
shape main
Then save your profile and deploy. The image named in the shape script must exist in the model at the time that you use it: Settings > Images... to add it, although I think the tidiest solution is to have an add-in that installs the profile (as part of a technology) and the images (as reference data) automagically.

I think your technology needs to be the active one for the common toolboxes to show. Go Settings > MDG Technologies, select your technology from the list and press the "Set Active" button (there is a list box on the main menu toolbar, just to the left of the Help button, that does the same thing).

However, it seems that ExtendedStyle is empty when the diagram is first created by the AI, so it is necessary to set the complete ExtendedStyle string
I don't think that's true. Try just setting the value or values that you are interested in, and EA will add the rest.

Automation Interface, Add-Ins and Tools / Re: More than one toolbox
« on: July 28, 2011, 09:21:31 am »
You can only have one toolbox profile per custom diagram type, but each toolbox profile can have multiple toolbox pages. Have a look at the BPMN 1.1 toolbox for an illustration: "BPMN 1.1 Core", "BPMN 1.1 Relationships" and "BPMN 1.1 Types" are each defined in the BPMN toolbox profile as a stereotype that extends "ToolboxPage".

So in your toolbox profile, you would have your own ToolboxPage stereotype as before, plus a couple of stereotypes named "UML Class" and "UML Class Relationships" that also extend ToolboxPage. These would have attributes named "UML::Package", "UML::Class", "UML::Interface" etc, you can figure out the rest from the help file: Elements Used in Toolboxes and Connectors Used in Toolboxes. Ask Support if you get stuck...


i got it i use the connectors.stereotype that gave me the includes and extends value when the connectors.type = UseCase  and from there i was able to find out the extended and included use cases using the supplier id and client id attribute.

Safer to check Connector.Subtype (possible values: "Extends" or "Includes")

Automation Interface, Add-Ins and Tools / Re: Hidden Toolbox Icon
« on: July 20, 2011, 10:41:11 am »
It certainly can be made to work: check out the BPMN toolbox where Start Event, Intermediate Event and End Event all lead to hidden toolbox pages and have custom icons.

The hidden toolbox page must be a «stereotype» class with the exact same name as the attribute in the calling toolbox page, it must extend «metaclass»ToolboxPage and «metaclass»ToolboxItemImage, it must have an attribute "isHidden" with initial value set to "true" and it must have an attribute "Icon" with initial value set to the full pathname of the 16x16 bitmap file.

One final thing I notice from looking at the source diagram for the BPMN toolbox profile: the name of the stereotype class and its matching attribute are prefixed with the technology name (BPMN1.1::StartEvent). That may or may not be important, but I have vague memories that it might be.

After you've checked out all those things, if you still can't get it working then pop a bug report in to Sparx Support with your technology file attached and someone will have a closer look...


Code: [Select]
SELECT ea_guid FROM t_diagram

Add something like this to the end of your shape script:

Code: [Select]
decoration composite

From a connector shape script, you can test against or display the following properties of the target element:

Sorry, no access to information about a target element's attributes.

print("#NOTES#"); should do it.

Smells like a bug. Please report through the normal channels. Thanks.

All ArchiMate elements are drawn using EA shape scripts. Unfortunately, there is no way in a shape script to change the size of a sub-shape depending on the size of the text that you wish to display in it. Can't think of a work-around that doesn't involve making the element's name shorter. :(

Automation Interface, Add-Ins and Tools / Re: Key store permissions
« on: April 05, 2011, 09:37:47 am »
And apparently I still have a red account....
Of course if it were up to me, you'd be [size=72]B&[/size]

PS See you Sunday...

Pages: 1 ... 150 151 [152] 153 154 ... 169