Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Screwtape

Pages: 1 ... 3 4 [5] 6
61
Hi Monsieur,

As I'm using the DocumentGenerator class, it doesn't allow you do save as docx, just RTF or HTML.

Quote
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.

62
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!

63
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?

64
Hi,

I'm afraid this doesn't help you, but I think it's a bug introduced in a recent upgrade, since it used to work fine for me, but I get the same issue now. I have to manually rescale all my diagrams after generating which is a real pain.

(To be fair - I'm using DocumentElement but it does the same thing with attached diagrams)

It may be worth raising a bug report.

Yours,

Screwtape.

65
Hi!

Is there a way to pass a null value, rather than an empty element, in a custom script XML?

If I define a row without, say a "Name" element, the output from the custom fragment is to show "Name". If I create a <Name/> element, the fragment "prints" the blank - but includes the headings and space I'd like to remove with bookmarks.

Is there any way of having an optional custom field and using bookmarks with it, like you can with normal fragments?

Thanks!

Screwtape.

66
But that won't scale correctly either... would it?

If I'm trying to do this...
  _____________________
 ( ( )
( ( )
( ( )
 (____________________( )
 
i need the curved lines to be roughly 1/4 to 1/5 the width of the overall height of the shape, regardless of the width of the overall shape. A surely bitmap either woudn't change height, or would scale in both axes independently.

67
It's practically useless then, and rather explains the lack of a decent cylinder icon.

All it needs is to be able to identify the size and/or aspect ratio, and perform basic arithmetic, and it would be really useful.

In the mean time, my otherwise very professional looking diagrams are let down by a lousy servicebus cylinder, that only looks approximately right if you have it precisely the right aspect ratio, which it often isn't because you need to to be long for the very reason it's a service bus.

It's bizarre, EA repeatedly lets itself down with really trivial issues.

68
Automation Interface, Add-Ins and Tools / Get target size in shape script.
« on: November 08, 2014, 12:48:17 am »
Hi!

I'm trying to improve on the embarrassing "cylinder" used for servicebus stereotypes.

However, having read the shapescript documentation, I can't see any way of finding out the size or aspect ratio of the object being laid-out.

You also can set scaling either on, fixed aspect, or off. I've even tried to add a sub-shape with fixed aspect, within a non-fixed main shape, but that doesn't work either.

Surely there must be a way of having a shape that is proportional to only one of the axes of the drawing, rather than both. It really makes shapescript rather inadequate if there isn't.

Please tell me I'm wrong and have missed something obvious!

69
Hi!

Does anyone know if it is possible to include an RFT tag (I'm trying to add a reference to a bookmark) in data from a custom script fragment?

I've tried adding the {\field...} in a CDATA section within the field, but this just shows the whole field as text.

Any ideas welcome...

Thanks!

Screwtape.

70
Hi!

Since a recent update (11.1 perhaps), my RTF document is generating differently. The fragment seeks to show the target of a connector, but instead the source is being shown. Has Sparx changed the definition of target and source, or is it just me?

Screwtape.

71
Hi! Does anyone know if it is possible to select an image in a custom fragment from the code? I'm setting field values, but I don't think I can insert an image from the image library in to the template, or see any way of providing an image in the custom fragment xml.

Can this be done?

72
Hi!

I've managed this using a tagged value, which seems to be rather an inelegant way of achieving it, as it actually modifies the element in question.

Has anyone out there got a better way of passing data from the controlling script to a custom fragment script?

Clint.

73
I'm scripting document generation (with jscript for some reason), and it would be very useful to be able to pass "global" variables or something between the script calling DocumentElement and the custom fragment script.

Is there any way of doing this?

74
I'm trying to create a custom fragment which has some optional data, and I don't want line breaks etc. if the fields aren't there.

I can achieve this using bookmarks for normal fields, but custom fields it doesn't seem to work in the same way.

Can this be done, and if so, what is the syntax for the bookmark names?

75
Hi.

I'm generating a RTF document with JScript.

I've put a data field in the template, and am using ReplaceField to update the value just prior to calling DocumentElement. When I do this, I keep getting Bell sounds and the document had the field replaced, not with what I specified, but several element names and descriptions.

If I comment out the ReplaceField method, it all works fine and just prints the default for the data field each time.

Very strange.

Anyone suggest what I might be doing wrong?

Pages: 1 ... 3 4 [5] 6