Generating Documents using Document Scripts in Enterprise Architect
Sparx Systems Enterprise Architect is one of the very few tools that has the capability to generate document on go from a centralized repository. Enterprise Architect has features to customize document contents using user templates, fragments, style sheets, cover pages and headers and footers.
- Document Script in fragments is a new option which is introduced in Enterprise Architect 13.
- Used generally for generating complex documents from Enterprise Architect.
Custom Script vs Document Script
- Custom script (Introduced in EA 11): Script returns a value which can be used in the fragment using the ‘custom’ field.
- Document script (Introduced in EA 13): A combination of scripts and templates. Script calls another Template and passes ID of an object to be reported
How Document Script works?
Advantages of Document Script:
- Flexibility in reporting desired fields in desired order
- Loop through or mix and match details in a custom way, as per the requirements.
- Removes need to write external addin to generate custom documents from the model.
Steps to create Document using Document Scripts:
- From Above business process diagram, we are going to generate all the diagram objects from the parent package.
- Initially have created a Template like below with package and element section enabled
- Under the Diagram Objects heading have inserted a new fragment and inside the fragment have enabled the Custom Section as below
- To create a document script Fragment -> Document Options ->Custom Query -> Document Script and in the dropdown select the script which is written for document generation.
- Reference the ID of the element or Package currently being processed by the document template, using the #OBJECTID# or #PACKAGEID#
- Process Package script does the magic of rendering the objects in an order to a document.
- Script which need be used in the Document script should always return an rtf
var docGenerator as EA.DocumentGenerator;
docGenerator = Repository.CreateDocumentGenerator();
if ( docGenerator.NewDocument(“”) )
{
docGenerator.DocumentElement(ElementID,Heading Depth,”templateName”); // Used to add the element details in rtf
var rtf = docGenerator.GetDocumentAsRTF();
return rtf;
}
- For more details on attributes and methods of DocumentGenerator class please refer Sparx Help on Document Generator class
- In document script a template should be referred so that the data will be formatted and printed based on that template.
- For e.g. From the below package structure in Enterprise Architect
- If the documentation is generated in the package level (BP00100) and the script for rendering all the diagram objects of a diagram
- We need to pass the packageID as the parameter in document script.
- In the script main function rtf should be returned
function main(packageID)
{
var docGenerator as EA.DocumentGenerator;
docGenerator = Repository.CreateDocumentGenerator();
if ( docGenerator.NewDocument(“”) )
{
try
{
var package as EA.Package;
package = Repository.GetPackageByID(packageID);
var diagram as EA.Diagram;
diagram = package.Diagrams.GetAt(0);
var diagramObjects as EA.Collection;
diagramObjects = diagram.DiagramObjects;
for( var i = 0 ; i < diagramObjects.Count ; i++ )
{
var diagramObject as EA.DiagramObject;
diagramObject = diagramObjects.GetAt( i );
var currentElement as EA.Element;
currentElement = Repository.GetElementByID(diagramObject.ElementID);
if(currentElement.Type != “Note” && currentElement.Type != “ActivityPartition” && currentElement.Type != “Pool” && currentElement.Type != “Lane”)
docGenerator.DocumentElement(currentElement.ElementID,1,ACTIVITY_TEMPLATE);
}
}
catch(e)
{
Session.Output(e);
}
var rtf = docGenerator.GetDocumentAsRTF();
return rtf;
}
return “”;
}
- Templates inside the script can be mentioned as below
var ACTIVITY_TEMPLATE = “Activity_Report”;
Conclusion:
- Above described is an example for generating a document using document script .You can download this entire sample model with document generation scripts and templates from http://sparxsystems.in/downloads/DocumentScriptTest.eap
- Any complex logics can be used in the script but finally it should return an RTF.
For more details or assistance please drop a mail to info@sparxsystems.in
156 Comments
Comments are closed
Quando tiver dúvidas sobre as atividades de seus filhos ou a segurança de seus pais, você pode hackear seus telefones Android em seu computador ou dispositivo móvel para garantir a segurança deles. Ninguém pode monitorar o tempo todo, mas há um software espião profissional que pode monitorar secretamente as atividades dos telefones Android sem alertá-los.
Your article helped me a lot, is there any more related content? Thanks!
Wow, marvelous weblog layout! How long have you
been running a blog for? you make running a blog look easy.
The entire glance of your site is fantastic, let alone the content material!
You can see similar here sklep online
excellent issues altogether, you just won a brand new reader.
What would you suggest in regards to your
publish that you made a few days ago? Any certain? I saw similar here: Dobry sklep
Hey there! Do you know if they make any plugins to assist
with Search Engine Optimization? I’m trying to get my blog to rank for
some targeted keywords but I’m not seeing very good success.
If you know of any please share. Cheers! You can read similar art here: Sklep online
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
Hey there! Do you know if they make any plugins to assist with Search Engine Optimization? I’m trying to get my site to rank for some targeted keywords but I’m not
seeing very good results. If you know of any please share.
Kudos! I saw similar text here: Backlink Building
Howdy! Do you know if they make any plugins to assist with Search Engine Optimization? I’m trying to get my blog to rank for some targeted
keywords but I’m not seeing very good results.
If you know of any please share. Thanks! I saw similar article here: GSA Verified List
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Wow, incredible blog format! How long have you ever been running a blog
for? you make running a blog glance easy. The full glance
of your website is excellent, let alone the content! You can see similar here e-commerce
Explore an extensive range of Products designed to enhance your experience. From devices to e-liquids and accessories, find everything you need to enjoy vaping to the fullest.
“Game online penghasil uang adalah cara terbaik buat nambah penghasilan! Seru dimainkan dan menguntungkan!”
Howdy! Do you know if they make any plugins to assist with SEO?
I’m trying to get my blog to rank for some targeted keywords
but I’m not seeing very good gains. If you know of
any please share. Cheers! I saw similar text here:
Good escape room
Very good blog post. I certainly love this site. Keep writing!
I have been surfing online more than three hours nowadays, yet I never found any fascinating article like yours. It’s lovely price enough for me. In my view, if all website owners and bloggers made excellent content as you probably did, the web will be a lot more useful than ever before!
Wonderful article! We are linking to this great post on our website. Keep up the good writing.
Hi there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results.
If you know of any please share. Cheers! I saw similar blog here
Thanks for the great advice on asbestos removal. Safety is paramount!
Great advice on the importance of proper asbestos removal. Thanks!
Thanks for the valuable information on asbestos removal and safety.
Thanks for the clear and concise information on asbestos removal safety.
/**/and/**/cast(md5(‘1939461110’)as/**/int)>0
After looking over a number of the blog articles on your web page, I truly like your way of blogging. I book-marked it to my bookmark website list and will be checking back soon. Take a look at my website too and tell me what you think.
You really make it seem really easy together with your presentation but I in finding this topic to be actually one thing which I think I’d never
understand. It seems too complicated and extremely huge for me.
I am taking a look forward for your next post, I will attempt to get
the dangle of it! Escape room lista
Excellent post. I am facing many of these issues as well..
Very interesting info!Perfect just what I was searching for!!
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Spot on with this write-up, I truly think this web site needs much more attention. I’ll probably be returning to read through more, thanks for the info!
Everything is very open with a precise clarification of the challenges. It was definitely informative. Your website is useful. Many thanks for sharing!
https://artdaily.com/news/171650/Mp3Juice-Review–The-Pros-and-Cons-You-Need-to-Know
There’s certainly a lot to know about this topic. I like all of the points you made.
I could not refrain from commenting. Very well written.
Having read this I thought it was extremely informative. I appreciate you taking the time and effort to put this content together. I once again find myself personally spending a significant amount of time both reading and posting comments. But so what, it was still worth it.
Everything is very open with a very clear description of the issues. It was really informative. Your site is very helpful. Many thanks for sharing.
I’m amazed, I have to admit. Seldom do I encounter a blog that’s both equally educative and amusing, and let me tell you, you’ve hit the nail on the head. The problem is something too few people are speaking intelligently about. I’m very happy that I came across this during my search for something regarding this.
Thanks for another wonderful article. Where else could anybody get that type of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such info.
Way cool! Some very valid points! I appreciate you penning this write-up and the rest of the website is really good.
Hurrah! Finally I got a blog from where I be capable of genuinely get helpful data regarding my study and knowledge.
my web blog; why not try these out
Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your website? My blog is in the exact same area of interest as yours and my users would really benefit from a lot of the information you present here. Please let me know if this ok with you. Appreciate it!
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
Hi just wanted to give you a quick heads up and let you know a few of the images aren’t loading correctly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same outcome.
Your style is so unique in comparison to other folks I’ve read stuff from. Thanks for posting when you’ve got the opportunity, Guess I’ll just bookmark this blog.
Excellent article! We will be linking to this great content on our site. Keep up the good writing.
I really like it whenever people come together and share opinions. Great blog, keep it up.
Your article helped me a lot, is there any more related content? Thanks!
This is fantastic! Full of useful information and extremely articulate. Thanks for offering this.
Wow, fantastic blog layout! How long have you been blogging for?
you made blogging look easy. The overall look of your
site is magnificent, as well as the content!
Here is my website see here
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://accounts.binance.com/pl/register?ref=YY80CKRN
555
1
555
-1 OR 3+426-426-1=0+0+0+1
1′”
555
555
555
1
1
1
1%2527%2522
1′”
1%2527%2522
CZf64z3l
0″XOR(if(now()=sysdate(),sleep(15),0))XOR”Z
1 waitfor delay ‘0:0:15’ —
@@W25yI
I was suggested this web site by my cousin. I am not sure whether this post is written by him as nobody else know such detailed
about my trouble. You’re wonderful! Thanks!
Here is my site – more bonuses
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Good information. Lucky me I found your site by chance (stumbleupon). I have bookmarked it for later!
Great post. I will be going through a few of these issues as well..
Your article helped me a lot, is there any more related content? Thanks!
Including Sugar Defender into my daily regimen has
been a game-changer for my general wellness. As a person that
currently prioritizes healthy consuming, this supplement has offered
an added increase of protection. in my energy levels, and my wish for unhealthy snacks so easy can have such an extensive
influence on my life.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Chill Zone 오피사이트
Strip Club 하이오피
Hey there! Do you know if they make any plugins to help with
SEO? I’m trying to get my site to rank for some targeted keywords
but I’m not seeing very good success. If you know of any please share.
Kudos! You can read similar blog here: Eco blankets
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
How Increase Your Web Presence Link Popularity
주소모음
I get pleasure from, cause I found just what I used to be taking a look for.
You have ended my 4 day lengthy hunt! God Bless you
man. Have a nice day. Bye
Feel free to visit my website – browse around this website
sugar defender reviews
For several years, I have actually battled uncertain blood sugar level
swings that left me feeling drained and inactive.
But because integrating Sugar Defender right into my routine, I have actually noticed a significant renovation in my overall energy
and stability. The dreadful mid-day distant memory, and I appreciate that this all-natural solution attains these results
without any undesirable or negative responses.
truthfully been a transformative discovery for me.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
sugar defender ingredients As somebody who’s always been cautious concerning my blood sugar
level, discovering Sugar Protector has actually been an alleviation. I
feel a lot more in control, and my current check-ups have revealed positive renovations.
Recognizing I have a reputable supplement to sustain my
routine offers me satisfaction. I’m so thankful for Sugar Defender’s
effect on my health!
Oh my goodness! Awesome article dude! Thanks, However I am going through troubles with your RSS. I don’t understand why I cannot subscribe to it. Is there anybody getting identical RSS issues? Anybody who knows the answer will you kindly respond? Thanks.
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
Your enticle helped me a lot, is there any more related content? Thanks! https://accounts.binance.com/en/register?ref=JHQQKNKN
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
It’s hard to come by knowledgeable people for this subject, but you sound like you know what you’re talking about! Thanks
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Your article helped me a lot, is there any more related content? Thanks!
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Your style is so unique in comparison to other people I have read stuff from. Thank you for posting when you have the opportunity, Guess I’ll just bookmark this site.
May I simply just say what a relief to uncover somebody that really knows what they are talking about on the web. You certainly know how to bring a problem to light and make it important. More people need to check this out and understand this side of the story. It’s surprising you’re not more popular because you certainly have the gift.
You would normally charge for lessons by the hour
and your salary will depend on how many hours you work and your location.
When selecting an instructor, their schedule should work
with yours—not the other way around.
It gives you great flexibility to plan deliveries or cut that
grass.
The Victorian Government acknowledges Aboriginal Traditional
Owners of Country throughout Victoria and pays respect to their cultures and
Elders past, present and emerging.
Highly recommended for independent instructors and large schools.
We’re a professional body of working ADIs who have created a supportive space to train, represent,
inform and protect driving instructors.
Find information about categories of tests available as well as sitting your test online.
Despite the fact that they may not be supplying you with
pupils and you have no money coming in you still have to pay
the franchise fee.
Improve your personal and professional growth by joining
our focused ADI training courses and events.
You explain that you’re going to do the braking because the other driver is too close and they must not touch the pedals at all.
Tyres are a crucial vehicle component, and learning more about
them could keep you safe on the road as well as save you money.
That means only around 15% of all ADIs (about 40,000 in total) could be bothered to
reply.
If English isn’t your first language and you don’t feel confident about your English, that doesn’t
have to be a road block.
Your personal information gets managed in line with industry standards.
We’re the largest driving school in the UK, which means that you’ll be spoilt for choice when it
comes to driving instructors!
Realistically you must expect to spend another £300 to £500 on part 3 lessons.
They really want a product that helps us driving instructors be more productive.
It wasn’t until 1939 that Norman Bel Geddes created the first self-driving car,
an electric vehicle guided by radio-controlled electromagnetic
fields.
If you have held a driving instructor authority in another state or
territory, you can apply for ‘mutual recognition’.
The DIA is more than just a membership — it’s
a community of ADIs and driving instruction experts, all working to improve the industry together.
She will build your confidence and treat you with respect whilst preparing you for your driving test.
It can feel like you’re a naughty kid at first,
bunking off school and spending time at home.
The Find a job service can help you with your search for jobs and send alerts when new jobs become available.
You can go home, go for a walk or do whatever you want to do.
At RED Driving School we can offer both automatic and manual driving lessons.
Private driving instructors are slowly being phased out in Singapore.
You pay the school a set weekly/monthly amount to be given a car and supplied with work.
A booking fee of £2.50 is payable to every package purchased through drive.je including block deals or vouchers.
The Find a job service can help you with your search for jobs and send alerts when new jobs become available.
We only use your contact details to contact you about your driver instructor authority and the industry.
This is often a false sense of security though because no driving school can guarantee they’ll always have work.
The pupil does the complete opposite of what you said,
slams the brake pedal down and the car behind crashes into you.
From city driving to suburban streets, we prepare you for all
Brisbane road conditions.
Learning to drive is a major milestone—our Brisbane instructors make it
a smooth experience. Our patient, friendly instructors make all the difference
in your learning experience.
Booking lessons with us means learning in a modern, dual-controlled car for
your safety.
Your confidence will grow with every lesson—our structured approach ensures it.
Our patient, friendly instructors make all the difference in your learning
experience.
Ready to take the next step? Book your first lesson today and start your driving journey!
We focus on road safety, not just passing the test.
That’s what makes our drivers better! Ready to hit the road?
Our driving school is the best place to start!
We offer affordable driving lesson packages without compromising on quality.
Driving in Brisbane means handling various road conditions—our lessons prepare you for them all.
Roundabouts can be tricky, but our expert instructors make sure you get it right every time.
We provide structured, easy-to-follow lessons that build
your skills step by step.
Don’t risk bad habits—learn the correct techniques from the very
beginning. We focus on road safety, not just passing the test.
That’s what makes our drivers better!
Master lane changes and motorway driving with our expert lessons.
With the right instructor, learning to drive is easy and enjoyable.
Master lane changes and motorway driving with our expert lessons.
Driving in Brisbane’s CBD requires skill—our lessons prepare you for tight spaces and heavy traffic.
Want to master highway driving? Our lessons ensure you’re
comfortable at higher speeds. The sooner you start learning, the sooner you gain independence on the
road!
The key to passing your driving test? Structured practice
with a professional instructor.
Brisbane’s roads can be busy, but we’ll help you drive
them with confidence. Parallel parking is a must-have skill for Brisbane drivers—our
method makes it easy!
No two learners are the same—we personalise our approach to suit you.
Don’t risk bad habits—learn the correct techniques from the very beginning.
The key to passing your driving test? Structured practice with
a professional instructor.
Parallel parking is a must-have skill for Brisbane
drivers—our method makes it easy!
We focus on developing safe, skilled drivers, not just test passers.
Need help preparing for your driving test? Our mock
tests will get you ready!
Roundabouts can be tricky, but our expert instructors make sure you get it right every time.
Driving in Brisbane’s CBD requires skill—our lessons prepare you for
tight spaces and heavy traffic. Our friendly, patient instructors make
learning to drive stress-free and enjoyable.
Pick-up lessons are only available in two-hour increments.
You can select multiple services or choose each service individually.
Organized by driving environment, the guide includes
specific driving goals for each environment, as well as 54 short video tutorials.
Our simulator helps you build confidence without the pressure of real
roads.
I was able to find good info from your articles.
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
My programmer is trying to convince me to
move to .net from PHP. I have always disliked the idea because
of the costs. But he’s tryiong none the less. I’ve been using Movable-type on various websites for about a
year and am nervous about switching to another platform.
I have heard good things about blogengine.net.
Is there a way I can transfer all my wordpress content into it?
Any help would be really appreciated!
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
I have to thank you for the efforts you have put in writing this website. I really hope to check out the same high-grade content by you in the future as well. In truth, your creative writing abilities has motivated me to get my own blog now 😉
Your article helped me a lot, is there any more related content? Thanks!
An intriguing discussion is worth comment. There’s no doubt that that you need to write more about this issue, it might not be a taboo subject but typically people do not discuss these topics. To the next! Kind regards.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://accounts.binance.com/en-IN/register-person?ref=UM6SMJM3
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
Saved as a favorite, I really like your blog.
I blog quite often and I genuinely appreciate your information. This great article has really peaked my interest. I am going to bookmark your website and keep checking for new information about once per week. I opted in for your RSS feed too.
Hi there! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying
to get my site to rank for some targeted keywords but I’m not seeing very good gains.
If you know of any please share. Cheers! You can read similar art here: Coaching