Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Screwtape on May 11, 2015, 07:50:15 pm
-
Hi!
I've upgraded from EA11 to EA12, and since doing so, when I generate documentation, using a custom script and custom fragments, I note that the bookmark that had the element's GUID and used to surround the element, now appears to start and end at the end of the element's title.
This means that the bookmark now cannot be used for constructing references. (i.e. see paragraph 3.4)
Does anyone know why this has changed, or how to get it to work the way it used to?
-
Check what build you have - a correction for this was posted in 1207.
-
Hi! Thanks for that. I've upgraded to 1214 and it's still doing the same thing I'm afraid. Is it worth raising (or re-raising) as a bug?
Interestingly, if there is a diagram displayed as part of the element, the bookmark now links to the diagram, rather than the whole element as it used to.
I was using the bookmarks to reference other sections in the generated document, but that doesn't work now, and I can't see any other way to do it.
Thanks!
-
I have major bugs using RTF generation but none using docx.
Can you try in docx?
-
Hi Monsieur,
As I'm using the DocumentGenerator class, it doesn't allow you do save as docx, just RTF or HTML.
SaveDocument (string filename, long nDocType)
Boolean
Saves the document to disk.
Parameters:
• filename: String - the filename to save the file to
• nDocType: Long - 0 = RTF, 1 = HTML
Is there a way to save to docx using the API?
Yours,
Screwtape.
-
Hi Monsieur,
As I'm using the DocumentGenerator class, it doesn't allow you do save as docx, just RTF or HTML.
SaveDocument (string filename, long nDocType)
Boolean
Saves the document to disk.
Parameters:
• filename: String - the filename to save the file to
• nDocType: Long - 0 = RTF, 1 = HTML
Is there a way to save to docx using the API?
Yours,
Screwtape.
I think your HELP is outdated... are you sure it is for the V12?
http://www.sparxsystems.com/enterprise_architect_user_guide/12.0/automation_and_scripting/document_generator_interface_class.html
Just saying :
Saves the document to disk.
Parameters:
· filename: String - the filename to save the file to
· nDocType: Long - 0 = RTF, 1 = HTML, 2 = PDF,
3 = DOCX
M.
ps: Nxt coffee is on you ;)
-
D'oh!
That's using Google for you! I'd just Googled the class name and I hadn't noticed the hit it gave me was from 9.2 which may explain why the API seemed so far behind the normal functionality!
Maybe I'll have less issues now... I'll give it a go! :)
Thanks!
-
D'oh!
That's using Google for you! I'd just Googled the class name and I hadn't noticed the hit it gave me was from 9.2 which may explain why the API seemed so far behind the normal functionality!
Maybe I'll have less issues now... I'll give it a go! :)
Thanks!
Was in your situation not so long ago ;)
-
Tried using DOCX generation instead of RTF.
The same issues seem to be happening. The bookmarks are in the same places as before, and the diagrams are not sizing correctly - see http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1433924671.
It looks like the document generator isn't working quite correctly when called from the API.