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 - bITs.EA

Pages: 1 [2] 3 4 ... 6
16
Hi

I'm trying to do a checkout (in batch) via a script. It seems to work, but I don't understand why the "Import package dialogue box is shown instead of the normal "checkout" dialogue box.

1) Is this normal behaviour?
2) how can I do a "undo checkout" via scripting? (I can't find a function in the manual...)


17
Can you give an example of a DOM parser? I never used one, but I want to learn! :)

18
In the code below, I select objects with a certain stereotype (in reality, all these objects are packages). This results in a collection of elements (which are also packages).

How can I convert the Element to a Package? (Package to Element is possible via "Package.Element", but I can't find the opposite in the manual...)

Code: [Select]
dim collection as EA.Collection

dim sql, count, testTxt
sql = "SELECT t_object.Object_ID FROM t_object WHERE t_object.stereotype = 'ProcessLevel4'"
count = 0
testTxt = ""

set collection = Repository.GetElementSet(sql, 2) '= collection of Package ELEMENTS (no collection of packages)

for each packageElement in collection
'Store name and stereotype of package Element
testTxt = testTxt & vbcrlf & packageElement.Name & "-" & packageElement.StereotypeEx

'Get diagrams in Package

'TO DO: convert Element to Package to get diagrams in package

next

Msgbox "# = " & collection.Count & vbcrlf & vbcrlf & testTxt

19
Ok, I'm trying to create a script for executing this action.

1 question: I have a query which selects all needed elements. But the result in the script is an XML formatted string (via Repository.SQLquery()).

What is the easiest way to ge the needed elementID out of a query result? Can I get some sort of "recordset" to cycle through easily?

EDIT: found the solution in topic http://sparxsystems.com/forums/smf/index.php/topic,5665.msg126095.html#msg126095

When the script is ready, I will post it!

20
Automation Interface, Add-Ins and Tools / Change stereotype in batch
« on: April 11, 2016, 09:38:00 pm »
Hi

I want to change the stereotype of a large number of elements. I want to be sure that all the tagged values of the new stereotype are automatically added to all elements. What is the best way to execute this action?

I've found an old topic about this question (http://sparxsystems.com/forums/smf/index.php/topic,23020.msg192337.html), but I want to know if there are already other options in the newer versions of Enterprise architect...

Thanks!

S

21
Simple question: is it possible to save certain stereotypes in a specified package?

Eg. I've created a new stereotype "pain point" and I want to store them automatically in the "pain point package". My problem is the pain points can be created on many different locations and some will be used on different locations too. So I want 1 repository (= package) of pain points.

Is this possible in EA?

22
Yes, you have 2 distinct scenarios for the shape script of an element:

1) Adding properties / attributes of the element itself to a shape.

This can be done using subshapes (like in your example). This applies to native & custom shapes.

2) Adding properties of child elements of the element. (eg. add the names of all the child elements of a package)

This can be done using "shape ChildElements{}" IF you use a native shape.
This cannot be applied to custom shapes.

Unfortunately, I want to show ChildElements in a custom shape...

23
I've tried using the script below, but no extra compartment with package contents is shown. Only when I use the "DrawNativeShape()" command, it works. But I want to add a compartment to a custom shape... So what should I change to add a compartment to the custom shape below?

Code: [Select]
shape main{

noshadow = "TRUE";
h_align = "center";
v_align = "center";

if(hastag("Macroprocess Type","Management"))
{
//Blue color scheme
//setfillcolor(0,204,255);
//Grey / Orange color scheme
setfillcolor(200,200,200);
}
if(hastag("Macroprocess Type","Primary"))
{
//Blue color scheme
//setfontcolor(255,255,255);
//setfillcolor(0,43,255);
//Grey / Orange color scheme
setfillcolor(255,140,0);
}
if(hastag("Macroprocess Type","Supporting"))
{
//Blue color scheme
//setfillcolor(142,237,255);
//Grey / Orange color scheme
setfillcolor(225,225,225);
}

startpath();

moveto(0,0);
//lineto(15,50);
lineto(0,100);
lineto(85,100);
lineto(100,50);
lineto(85,0);
lineto(0,0);

endpath();

fillandstrokepath();
printwrapped("#NAME#");

//DrawNativeShape();
}

//Add compartments for Child elements.
shape ChildElement
{
     //So set the compartment name to "Contents".
     SetCompartmentName("Contents");
   
     //Add the child elements name to the child compartment.
     AppendCompartmentText("#NAME#");
}

24
So if I understand well, I should add this under my main script and it should work?

Code: [Select]
//Add compartments for Child elements.
shape ChildElement
{
     //So set the compartment name to "Contents".
     SetCompartmentName("Contents");
   
     //Add the child elements name to the child compartment.
     AppendCompartmentText("#NAME#");
}

EDIT: Tested the above and no extra compartment in the element... What did I do wrong??

25
Hi

I've created a custom Shape Script, but now I want to add an extra compartment showing the "package contents" (if this is selected in the diagram properties)...

This is my current shape script, but I can't find the needed info in the user guide to add the deparment. Can someone help me, please?

Code: [Select]
shape main{

noshadow = "TRUE";
h_align = "center";
v_align = "center";

if(hastag("Macroprocess Type","Management"))
{
setfillcolor(0,204,255);
}
if(hastag("Macroprocess Type","Primary"))
{
setfontcolor(255,255,255);
setfillcolor(0,43,255);
}
if(hastag("Macroprocess Type","Supporting"))
{
setfillcolor(142,237,255);
}


startpath();

moveto(0,0);
//lineto(15,50);
lineto(0,100);
lineto(85,100);
lineto(100,50);
lineto(85,0);
lineto(0,0);

endpath();

fillandstrokepath();
printwrapped("#NAME#");

}

26
Bugs and Issues / Re: Import issue: overwritten records
« on: March 17, 2016, 02:16:13 am »
If someone else has this problem... The following has solved it for me:

1) Delete the 'infected' packages in the repository
2) Right click on a package/root model and select the xml of the root package of the 'infected' packages in via "get package..."
3) Right click on the imported package en perform "get all latest"

Now, EA imports all version controlled files which were originally under the root package.

This way, the problem with references to wrong xmi in version control is solved too!

I hope this can help others...

I will send a change request to Sparx too for asking to add a warning before overwriting!

27
Bugs and Issues / Re: Import issue: overwritten records
« on: March 16, 2016, 09:41:26 pm »
Thanks for the answers!

1) Everything is in Version Control. So how can I restore? Via new .eap file and do "get all latest"? Or is there another easier functionality in EA?

2) Geert, in my old repo the packages were linked with other version controlled xmi's than the same package in the new repo (IT restructured the Version Control structure). But after my import, the packages are searching for the old xmi's again... resulting in an error message telling me that the package is "not controlled". So I want to change the reference of the packages to the right xmi...

28
Bugs and Issues / Import issue: overwritten records
« on: March 16, 2016, 08:46:12 pm »
Hi

Yesterday, I tried to import an old repository (via import / export XML) into a new one. I imported the XML in a seperate "Archive" package, but nevertheless the import impacted lots of other packages:
- References to version control files changed to old references
- Package contents of packages which already existed in the old repo were overwritten with the old contents (so I lost content!!)
- Some packages are now a merge between old and new

1) Is there a way to 'revert' the repository to a state before my import?
2) Is there a way to appoint another version control XML to a package and import those contents?

Thanks for the help!

Grts

S

29
I would like to have a feature which makes it possible to decide which stereotypes are shown in a package element (when you drag a package onto a diagram).

It's already possible to decide which operation/attribute stereotypes are shown in a class element, so could this be extended to the package element?

30
General Board / Re: BPMN and reporting its relationships
« on: November 16, 2015, 12:42:35 am »
Yes, like Geert says, it is possible to list the activities for each lane. With the document generator you can simply loop through all lanes in a process package and list all the activities in that lane.

Be careful though, it is possible that not all activities are in the right lane (after moving from one lane to another, EA doesn't always switch the "owner" of the activity).
So check this before you create a report!

Pages: 1 [2] 3 4 ... 6