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

Pages: 1 ... 3 4 [5]
61
Hi,

I have a script where I would like to get access to the namespace of an element. I have a faint memory of this not being possible throught the API? But I guess it would be possible through an sql query?  But where is this information hidden?

E.g. How is it possible to know that MyNode is a MyNodeType?

<<Node>> MyNode : MyNodeType

Thank you in advance!


Edit: Changed the subject name since later posts show it was not Namespace I was looking for.

62
Thank you! That did it.

63
Thank you for the reply!

I can confirm that your suggestion works for elements. Alas, I have no luck with connectors.

I cleaned up the profile and removed the stereotypes I want to copy. Thus, I only added attributes to the toolbox, e.g.:

SysML1.3::copy(SysML1.3::copy) = Copy (SysML)
SysML1.3::requirement(SysML1.3::requirement) = Requirement (SysML)

The element, requirement, works but not the connector. Also, in the toolbox the element and connector doesn't get a fancy icon, just an icon looking like <>. Not sure what that means, but when I got the connector working with a changed name it got its proper icon.

The only solution I still got is to create a dummy stereotype, with an different name than the original, that extend the connector's stereotype. I must be doing something wrong!

I can't find any examples of adding connectors. The only ones are of elements...  :-[


Update:
I just realized that it works differently if I import it as a UML profile instead of as a MDG. I only get the connector working when importing a profile as a UML profile. When I do a MDG the connectors don't work(EA thinks it's an element) . Thus, I do something wrong when adding a connector to a Toolbox - somehow I must mark those as connectors and not elements. But what?  (I still need to change the name of the stereotype to get it working)

I also get fancy icons (in the toolbox) when importing as a pure UML profile, and only  default icons when importing as MDG.


 


64
Hi!

I'm trying to set up a MDG which extendes SysML with a few custom stereotypes. For ease of use I also would like to include a couple of stereotypes directly from SysML in my toolbox. Alas, the only way I manage to add anything to my toolbox is if I give the stereotype a new name. But since I don't do any changes in comparison to the original stereotype I would like to keep the same name, just add a button in my Toolbox.

For example, I want to include the connector "copy" to my profile "Extension". In the profile diagram I add the metatype (SysML1.3::copy), add a stereotype (copy), which generalizez the metatype.

In the toolbox profile I then add the attribut Extension::copy(SysML1.3::copy) to the stereotypes that extends the ToolBoxpage.

This work fine, IF I hadn't chosen the name "copy" on my stereotype but instead CustomCopy. But I don't want to change the name...

What else should I do to be able to just include elements and connectors from an MDG in my custom made Toolbox, without changing the name of every single one.


Hoping for your wisdom!

Edit: Rephrased the q to be more to the point...

65
Thank you for your replies.

The issue resolved itself by excluding :: from the name of the stereotype. It would have been nice with a warning from EA that such a name would mess thing up (but I guess that wouldn't be in character  ::) ).


(For reference I'm using EA 10 build 1007)

66
It's just the UML profile, not a whole MDG.

No effect when synchronising the stereotype.

67
I'm trying to create my first extension to EA. I want to extend the SysML1.3 Requirement to include a couple of tagged values.

I have followed the the chapter "Add Stereotypes and Metaclasses" aswell as http://www.tigerteam.dk/2011/how-to-develop-mdgs-for-enterprise-architect-part-1/.

I have successfully created a profile, added the tagged values as attributes  and finally imported it to a project. I can create a element with my new stereotype. But the tagged values I added as attributes are not there.

My profile looks like this:

<?xml version="1.0" encoding="windows-1252"?>
<UMLProfile profiletype="uml2">
      <Documentation id="BCC4F73A-A" name="SysML Extension" version="1.0" notes="SysML Extension"/>
      <Content>
            <Stereotypes>
                  <Stereotype name="Test::requirement" notes="" cx="90" cy="70" generalizes="SysML1.3::requirement" baseStereotypes="SysML1.3::requirement">
                        <TaggedValues>
                              <Tag name="ReqID" type="string" description="" unit="" values="" default=""/>
                              <Tag name="Source" type="string" description="" unit="" values="" default=""/>
                        </TaggedValues>
                  </Stereotype>
                  <Stereotype name="Test::requirement2" notes="" cx="90" cy="70" generalizes="SysML1.3::requirement" baseStereotypes="SysML1.3::requirement"/>
            </Stereotypes>
            <TaggedValueTypes/>
      </Content>
</UMLProfile>

What am I doing wrong? I'm just getting a normal SysML1.3::requirement, but with a new name.


68
Thank you for the reply. Nice to hear nesting is possible, but how do I tell the report-tool to go through all levels?

When I use several levels, as mentioned above (e.g. 2.1, 2.1.1), where each model document is pointed to a package in the model,  these are ignored by the report generator.

It only uses the top level model documents. What am I doing wrong?

69
I'm trying to create a rtf report based on a master document with nested model documents.

I have created the following structure:

<<master document>> Report1
  (diagram) Report1
  1: <<model document>> Chapter 1
  2: <<model document>> Chapter 2
  2.1:  <<model document>> Chapter 2.1
  2.2:  <<model document>> Chapter 2.2


When I generate the report only the first level is reported, i.e Chapter 1 & 2, not Chapter 2.1 & Chapter 2.2.

Must all model documents be on the same level? Or how do I tell it to go down a level. Using child package in the Template does kinda the same thing, but then it ignores the templates I have set to each level.

70
Hi!

I'm trying to use model scripts in a RTF fragment, but feel a bit lost. All I can find in the documentation are the two pages of "Example RTF Template Fragment Script" and "Example Output of an RTF Template Fragment Script". These don't really cut it for me... Do anyone know about where to read about this feature?

Where can I read about working with the XML-object ("MSXML2.DOMDocument.4.0") ?

How and what parameters are available in the template to pass to the script? The example has #objectid# as a parameter, but don't use it in the actually script.

For example, if I want a script that from a packageId do cool stuff, how do I pass it to the script? Is #objectid# that I should use, and is this the only thing that a template can pass forward?
Found this: Q: What else can be passed into the script function other than Object ID? Can I use a DiagramID?
A: You can also pass a PackageID. We plan to support DiagramID as well, but this capability is not available in the current release (10.0.1004).

Thank you for any help or hints!


71
Hi,

I'm lost trying to output tab in the Output-window. It seems to ignore \t. Is this correct? Creating a newline with \n works tho.



Edit: I noticed that vbTab actually adds a tab to the text, but the output window don't show it. I guess it's not possible to show tabs in the output then.

Case closed I guess.

Pages: 1 ... 3 4 [5]