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
2266
Quote
Does anybody know how to disable Shape Scripts based on some diagram property or custom tag?
There is a shape script command: drawNativeShape()

Quote
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."

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

Code: [Select]
label middletoplabel
{
      print("@");
}

label middlebottomlabel
{
      // hide the stereotype label
}

2268
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
{
    image("mypicture.jpg",0,0,100,100);
}
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.

2269
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).

2270
Quote
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.

2271
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...

HTH

2272
Quote
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.

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

2273
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...

2274
Try:

Code: [Select]
SELECT ea_guid FROM t_diagram

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

Code: [Select]
decoration composite
{
      orientation="SE";
      if(hasproperty("iscomposite","true"))
      {
            ellipse(0,40,40,60);
            ellipse(60,40,100,60);
            moveto(30,50);
            lineto(70,50);
      }
}

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

target.element.name
target.element.stereotype
target.metatype

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

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

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

2279
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. :(

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


PS See you Sunday...

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