Hi,
Does someone know if it's possible to build a fragment in javascript? I would like to use it in models creation. The other option is to use a "ready for use" fragment as a template but how I can get it in a report?
Looking forward to hear from you.
Hi,
we do not use this feature, but I looked it up. According to this, your request is not possible:
http://www.ariscommunity.com/users/kwanchoo/2011-03-24-adding-fragment-header-model-automatically
the only thing I can think of is to create templates and store them somewhere in ARIS database. Then you could copy these and add stuff you like. Question is, if this is applicable to your needs.
Regards,
Martin
Thank you very much for your quick reply. Yes, I would like to go this way but I need it for REPORTs and not for MACROs and I did not find any info regarding this. We create header using poligon with white color and place model attributes on it. It's not exactly what we want to see.
Well in that case only 2 options pop in my head.
1. Create desired objects and create their occurrences with report. But this won't do if you need other items, like polygons.
2. Create fragment-like-model that you can then copy and add other object occurrences, specific for each model. This will work exactly as typical fragment does.
Regards,
Martin
That depends on what exactly do you want to show on a fragment. If you want to have only company logo and polygons with model attributes, just add them via Insert -> Model attribute and these attributes will be dynamically changes according to current model.
Therefore if you create a copy of this template model, the attributes will refer to the model copy and not to the original one.
The only problem is it takes a little bit of time to make the template looks pretty nice.
Martin
What do mean " just add them via Insert -> Model attribute "? Can I have piece of code, please?
Our header (part of the code):
model.CreateTextOcc(xx, yy, Constants.AT_Name);
model.CreateTextOcc(xx, yy, "Type: " + model.Type()); //it's a problem: when an user copies this "fragment" the model type does not change because it is not attribute
model.CreateTextOcc(xx, yy, "Last Change: " + Constants.AT_LAST_CHNG_2);
Well I suggested that you create fragments manually as models. If you use this method, the model attributes will change without problems.
I am certain that the same result could be achieved via programming as you are writing. Unfortunately I do not have the resources to examine it properly.
Best regards,
Martin