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: Refreshing diagram via VBA macro
Topic Summary:
Created On: 12-Mar-2007 11:00
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.
 12-Mar-2007 11:00
User is offline View Users Profile Print this message


Raffaele Nappi

Posts: 8
Joined: 18-Jul-2006

Hi all,
I've a simple question: I want to refresh a diagram via VBA macro, after changing a symbol layout.

Now, as a workaround, I use:

Set ISA = Application.Interface("ISAImf")
ISA.SAExecuteMenuCommand 310
fficeffice" />>
Is there an another more efficent way to do this?

Thanxs
rN
>
Report this to a Moderator Report this to a Moderator
 13-Mar-2007 09:30
User is offline View Users Profile Print this message


SA Team

Posts: 148
Joined: 18-Nov-2005

Hi

That solution is the one we would suggest.
Closing and re-opening the diagram would also force a refresh, but the menu command is the best way to do it if you don't want the diagram to close.

Thanks
Ian

-------------------------

Senior Software Developer
Telelogic UK Ltd.
Report this to a Moderator Report this to a Moderator
 20-Mar-2008 17:01
User is offline View Users Profile Print this message


João Almeida

Posts: 7
Joined: 25-Nov-2005

Hi Raffaele,
where did you get that 310 code? I need to invoke a "Refresh Collection" on the edit Menu when I have an explorer collection on an explorer diagram and I can't discover its code.

Thanks in advance
João Almeida
Portugal

Report this to a Moderator Report this to a Moderator
 31-Jul-2008 17:46
User is offline View Users Profile Print this message


Elvin Stern

Posts: 9
Joined: 18-Jul-2006

This may be irrelavant in this thread but may be useful to other VBA developers.

If you need to invoke any of the menu items via VBA you can use the "executemenubyname" method of the application class. The parameter for this method is the "menu tool name" and can be determined by hitting Ctrl-Shift-F1 when mouse in hovering over the menu item.

for example if you have a diagram opened in SA under control of a VBA macro and you want to reroute all the lines then the following will do a "select all" followed by "route line(s)>retain connections"

SAapp.ExecuteMenubyName ("SAIDM_82")
SAapp.ExecuteMenubyName ("SAIDM_102")
Report this to a Moderator Report this to a Moderator
 28-Nov-2008 12:19
User is offline View Users Profile Print this message


Ted Carroll

Posts: 15
Joined: 17-Sep-2008

This looks useful - but Ctrl-SHift-F1 does not seem to work for me - I am using Citrix to access System Architect - maybe I am not doing it correctly - but any other way of finding this out?

Thanks



Originally posted by: Elvin Stern

This may be irrelavant in this thread but may be useful to other VBA developers.



If you need to invoke any of the menu items via VBA you can use the "executemenubyname" method of the application class. The parameter for this method is the "menu tool name" and can be determined by hitting Ctrl-Shift-F1 when mouse in hovering over the menu item.



for example if you have a diagram opened in SA under control of a VBA macro and you want to reroute all the lines then the following will do a "select all" followed by "route line(s)>retain connections"



SAapp.ExecuteMenubyName ("SAIDM_82")

SAapp.ExecuteMenubyName ("SAIDM_102")


Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic System Architect forum.
There are currently 0 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 0 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.