I wanted to create a word template to print all the classes with their attributes and operations.
I have understood you can add commands in comments, but what exactly are the commands for this?
Is there anywhere a template that shows how to print all the possible elements?
Thank you
Rolf
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My english isn't very good, but i'm going to try ;)
I want to do the same thing, but i don't know how. I'm new at this...
I used a REPEAT command to iterate through all the diagrams ({R}::;UMLClassDiagram;;), another REPEAT command to do the same thing through all the classes ({R}::;UMLClass;;) and another to the attributes. At the beggining i had these three loops nested, but i realised each one of them takes all the elements in the model. So i tried to create a SCRIPT command to save the name of the current class so i could do this in the nested REPEAT command: {R}::Design Model::ClassName;UMLAttribute;;, where ClassName is a variable containing the name of the current class.
With this i tried to show just the attributes that belongs to the current class, but it returns a REPEAT error.
What i'm trying now is to save the guid's Class (with current().GetGuid()) an then for each one of the attributes, DISPLAY it IF the owner of the attribute is equal to the guid previously saved. But the owner element is a XPD:REF, not a XPD:ATTR, so i don't know hoy to get it.
It has to be simpler than this...
Thanks for your help!!!!
Greetings.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I wanted to create a word template to print all the classes with their attributes and operations.
I have understood you can add commands in comments, but what exactly are the commands for this?
Is there anywhere a template that shows how to print all the possible elements?
Thank you
Rolf
Hi.
Have you done it finally?.
My english isn't very good, but i'm going to try ;)
I want to do the same thing, but i don't know how. I'm new at this...
I used a REPEAT command to iterate through all the diagrams ({R}::;UMLClassDiagram;;), another REPEAT command to do the same thing through all the classes ({R}::;UMLClass;;) and another to the attributes. At the beggining i had these three loops nested, but i realised each one of them takes all the elements in the model. So i tried to create a SCRIPT command to save the name of the current class so i could do this in the nested REPEAT command: {R}::Design Model::ClassName;UMLAttribute;;, where ClassName is a variable containing the name of the current class.
With this i tried to show just the attributes that belongs to the current class, but it returns a REPEAT error.
What i'm trying now is to save the guid's Class (with current().GetGuid()) an then for each one of the attributes, DISPLAY it IF the owner of the attribute is equal to the guid previously saved. But the owner element is a XPD:REF, not a XPD:ATTR, so i don't know hoy to get it.
It has to be simpler than this...
Thanks for your help!!!!
Greetings.
I have managed to create a template for generating the class specifications in the following form.
Class Specification
Class Name
Class Description
Class Attributes
Table with Attributes
Operations
Parameter Table.
As I cannot attach the file mail me and I can forward the template to whoever requires it.
Thanks and regards
Ganapatsa
Hello,
I did it that way:
[REPEAT] {R}::Analysis Model;UMLClass;;
[DISPLAY] ;current().Name;
[SCRIPT] currentClassPath = current().PathName
[REPEAT] {R}::Analysis Model;UMLClass;Attributes;(current().PathName).indexOf(currentClassPath) == 0
[ENDREPEAT]
[ENDREPEAT]
I don't know if it is the best way, but worked.
Now I want to show the attribute type. I tried [DISPLAY] ;current().Type; but didn't work. Anyone
knows how to do that?
Thanks