Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic System Architect (steve huntington)
Decrease font size
Increase font size
Topic Title: Renumber macro
Topic Summary: Has anyone produced a macro to renumber sensibly?
Created On: 19-Aug-2006 15:08
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 19-Aug-2006 15:08
User is offline View Users Profile Print this message


Jeremy Swift

Posts: 2
Joined: 10-Mar-2006

I'm getting to the end of a project to produce a set of BPMN diagrams. The autonumber appears to number in the order that processes (say) are added to the diagram. The standard renumber feature on the edit menu removes gaps but sticks with the sequence. Numbers are therefore random on the page.

My business audience like a numbering scheme that starts with 1 in the top left of the diagram and progresses elegantly across and down. I think that's reasonable. Has anyone produced a macro to do this?
Report this to a Moderator Report this to a Moderator
 21-Aug-2006 00:15
User is offline View Users Profile Print this message


Duane Hennessy

Posts: 112
Joined: 18-May-2006

There is an article about renumbering symbols within the Knowledgebase:

https://support.telelogic.com/en/sa/kb/show_content.cfm?id=9596

Albeit, it is using Data Flow Diagrams as an example, it may either solve the problem or give you some ideas on how to resolve it.

Our users number their own tasks using a number property within the symbol's symbol configuration in the USRPROPS file. We display this as on the symbols in the diagram.

Report this to a Moderator Report this to a Moderator
 21-Aug-2006 12:49
User is offline View Users Profile Print this message


Jeremy Swift

Posts: 2
Joined: 10-Mar-2006

Thanks Duane,

The article is simply about the renumber feature supplied with SA. Incidentally, I have now decided the order that uses is not even the order in which symbols are added. Seems totally random.

The idea of adding a new property has its attractions, but managing the numbers across the diagram hierarchy is the sort of job I'd much rather leave to the computer!

Jeremy
Report this to a Moderator Report this to a Moderator
 21-Aug-2006 16:58
User is offline View Users Profile Print this message


Duane Hennessy

Posts: 112
Joined: 18-May-2006

Here's another idea:
    1. A new property is added to the BPMN Process symbol, for display within the symbol.
    2. A macro is written to capture all of the Process symbols.
    3. The macro loops through them and captures the symbols' IDs and their Left and Top measurements in relation to the diagram.
    4. By ordering the IDs from top to bottom based upon their Left and Right coords consecutively we can find out what order they appear within the diagram.
    5. Then iterate through the ordered list of IDs, capture each symbol at a time and add an incremented counter to the symbol into the new property.
Of course, how you order the Processes will depend upon whether the symbols within the diagrams run left-right and down the page or some other hierarchical order. You seem to be doing this and seem to have one start point per diagram which means less hassle. An alternative solution to the above could be to follow flow symbols but would be a bit more complicated.

Edited: 21-Aug-2006 at 17:03 by Duane Hennessy
Report this to a Moderator Report this to a Moderator
 21-Aug-2006 18:01
User is offline View Users Profile Print this message


Duane Hennessy

Posts: 112
Joined: 18-May-2006

This is completely off of the top of my head (I'm not at work) but something like the following should do it. You'll have to rework bits of the code and you may want to send diagram objects to the routine and walk through all diagrams etc. I hope the attached code is formatted properly because I'm doing this on my Apple.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic System Architect forum.
There are currently 1 users logged in.
The most users ever online was 16 on 30-Oct-2008 at 14:46.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.