|
|
|
|
Re: display diagrams [message #1828698 is a reply to message #1828689] |
Wed, 17 June 2020 00:45 |
Ka Ha Messages: 9 Registered: June 2020 |
Junior Member |
|
|
Thx Stephane,
This does not work.
_I have added the nsuri stuff. Where is this documented, how can we know that we need to untick the capella option and that we need to add what you suggested with those specific versions 1.0.0 and not the 1.1.0 ( for example for the tree one it seems we cant have both).
Why don't we add them all?
_Where is it documented that we need to use one function asImage and not another (e.g. ASIMAGEBYREPRESENTATIONDESCRIPTIONNAME) as described in other forums?
_I have changed the code accordingly but this still does not work i.e I have the names of the component generated but not the diagrams and no validation errors.
M2doc is unprecedently confusing... I have read all the documentations available, and many, many forums pages...I mean just basic stuff like: define your main variable as the name of the project is written nowhere!
Thank you again for your help!
[Updated on: Wed, 17 June 2020 00:55] Report message to a moderator
|
|
|
Re: display diagrams [message #1828699 is a reply to message #1828698] |
Wed, 17 June 2020 01:07 |
Stephane LACRAMPE Messages: 217 Registered: July 2009 |
Senior Member |
|
|
Hi,
Well, all this is documented in the documentation:
- The entry point for the M2Doc documentation: https://www.m2doc.org/ref-doc/3.0.0/index.html
- The M2Doc services you are using to get diagrams are documented here: https://www.m2doc.org/ref-doc/3.0.0/m2doc_service_m2docsiriusservices.html
- The fact that you have to add the NSUris is documented here: https://www.m2doc.org/ref-doc/3.0.0/index.html#services
But indeed, being able to write your own Word template with m2doc will require you to learn a few things including the AQL query language, so if you don't have time to do this, we offer training services or sub-contracting services to write templates for you.
Nevertheless, I am sorry that what I sent you is still not working for you. If you want more help, I would like to know which Capella version you installed and which m2doc version you installed, and then maybe you can attach your word template so that I can see if there is something wrong.
You can use asImage() and ASIMAGEBYREPRESENTATIONDESCRIPTIONNAME(), they will both get you an image, but these function does not apply on the same object. The reason why I am using asImage is that I used representationByDescriptionName which enables you to get the Diagram Representation object, not the image. On this object you can apply the asImage() to get the diagram image, but also .name to get the actual diagram name.
I hope this helps
Stephane
Stephane LACRAMPE
Obeo Canada
|
|
|
Re: display diagrams [message #1828700 is a reply to message #1828699] |
Wed, 17 June 2020 02:37 |
Ka Ha Messages: 9 Registered: June 2020 |
Junior Member |
|
|
Thanks.
I also noticed that the example "in flight entrertainment" this option in the tab service expert in "edit the template": "Org.obeonetwork.capella.m2doc.aql.queries.M2DocGenServices".
Is this another tricky compulsory option to be aware of?
I cannot add anything in the tab service expert ( no suggestions and no ability to add it manually in the filter).
What should I do?
Is this necessary for m2doc to function?
What is an explicit constructor described in the m2doc documentation ? Do I have to use the explicit or the default to display nominal diagrams?
The m2doc documentation specifies this:
" When there is an explicit constructor with at least a parameter M2Doc can't instantiate your class since there is no default constructor. You need to implement the IServicesConfigurator interface. This interface link one or more options in the generation configuration to the service class in order to instantiate it. You need to use the org.obeonetwork.m2doc.ide.servicesConfigurator extension point to declare your implementation of IServicesConfigurator. If you want to use your implementation in standalone you can register it programmatically using M2DocUtils.registerServicesConfigurator()."
Again thank you so much, this is really making me crazy I was supposed to work on my complex engineering model...and I end up loosing time on ...a word template...
[Updated on: Wed, 17 June 2020 04:08] Report message to a moderator
|
|
|
Re: display diagrams [message #1828701 is a reply to message #1828700] |
Wed, 17 June 2020 04:05 |
Stephane LACRAMPE Messages: 217 Registered: July 2009 |
Senior Member |
|
|
I understand now why you are struggling, you started over from an empty word document.
What I would suggest you is to start over reusing one of the example word document provided with the example project, it would make it simpler, just empty the content and start writing your document.
Nevertheless, if you still want to use your own word document from scratch, then this is feasible, here is the list of what you have to do, using "Edit Template properties", to add Capella's metamodels and other services.:
- add all Capella's metamodels in the "nsuri (expert)" tab (In the add dialog you can enter "capella" in the filter field then select every nsuris and add them), also keeping the one you already added previously
- add services you can use the "services (expert)" tab on the same wizard page and add: org.obeonetwork.capella.m2doc.aql.queries.M2DocGenServices
- click next and add a self variable with the value capellamodeller::SystemEngineering
Click finish to save your changes, you can now open the template in MS Word to edit it.
If you can't edit some of the properties, you can do it in word. Go to File->info and on the right, you'll see "Properties" and just at the end of this word, an arrow, click on it and go to "Advanced Properties" and then custom and there you can add properties.
Once again, it is much simpler to start with a word document already provided as an example...
A Custom Constructor is a Constructor you provide yourself in a Class.
I hope this helps
Stephane LACRAMPE
Obeo Canada
|
|
|
Re: display diagrams [message #1828702 is a reply to message #1828701] |
Wed, 17 June 2020 04:43 |
Ka Ha Messages: 9 Registered: June 2020 |
Junior Member |
|
|
I am sorry but I have tried everything: the M2doc template and/or project and the creation of word myself.
The wizard is not acting so much as a wizard as as I never have the Org.obeonetwork.capella.m2doc.aql.queries.M2DocGenServices.
As I said...I cannot select anything here, and there are no suggestions in the filter, not even the possibility to type manually " org.obeonetwork.....". see attached.
Regards,
[Updated on: Wed, 17 June 2020 04:44] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04578 seconds