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.

Topics - Screwtape

Pages: 1 2 [3]

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?



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

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!


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




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?


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?

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?

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?


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?


I've a really simple query and yet I'm getting this error message "Too Few Parameters - Expected 1" each time the fragment is called.

The SQL is
Code: [Select]
SELECT name FROM t_object
where stereotype = "StartEvent"
and t_object.parent_id = #OBJECTID#
which seems so simple there couldn't be anything wrong with it, but I might just be blind.

Any help with this would be great! Thanks!


Is it possible to export or copy somehow an RDF template from one model to another (both in EAP files).

As it happens, one of my fragments has become corrupt and I want to restore it from the a backup of the EAP file, without losing all the rest of the changes to the model since the backup.

Any ideas?


I'm really struggling with the exclude filter in a template fragment.

If I exclude nothing, it works, but includes everything.

I want to show only ActivityPartition types in this fragment.

If I filter everything else out, then I get nothing.

So, the items I don't want to show in this fragment are mainly Activities and BusnessProcesses. So I try to filter out only Activity - and get nothing.

Are there hierarchies in these filters that if you filter the parent you filter out all the child types as well?

What do I need to do to make the filter exclude the things I want to exclude without excluding everything?

Hi! I'm trying to produce process documentation from a hierarchy of BPMN business processes and activities. The problem is that there are pools and lanes in the diagram, which I want to keep, but I don't want to report them as hierarchy levels.

What I'm trying to get is
1.1 Business Process 1
1.1.1 Business Process 2 (In Pool 1/Lane 1 say) Activity 1
1.1.2 Activity 2 (In Pool 1/Lane 2 say)

I've managed to get the Pools and lanes not to display, but they retain their hierarchy levels, so I'm getting

1.1 Business Process 1 Business Process 2 (In Pool 1/Lane 1 say) Activity 1 Activity 2 (In Pool 1/Lane 2 say)

so I've got two levels of headings numbering that I don't want.

I've tried filtering out the ActivityPartition type, and selected "Include child element even if the parent is filtered out.", but that just removes all the child elements of the pools/lanes and reports only the top level. I've done this both at the master template level, or at the specific fragment level, but in both cases the "Include child element..." flag seems to be ignored.

Any ideas would be welcome!

Anyone with any ideas how to do this?

I note in most of the templates and fragments, there are fields which have labels, where the label is only displayed if the field has data in it.

I've tried every context menu I can find to see how this is done, but to no avail. I also can't find anything in the documentation or help for this.

Can someone let me in on the secret?


I'm trying to build a report using templates and fragments. I've copied the template selector and referred to my copy in the primary template.

While when I override the values for Activity, and this seems to work fine, I've added lines for Pool and Lane but these seem to be ignored.

I can't find any documentation about this feature, and can't figure out what I'm doing wrong.

I've added lines in to the Custom Query Tab for the template selector
Code: [Select]
but that doesn't seem to do anything.

Any ideas what I am doing wrong?

Pages: 1 2 [3]