hwIPage AddWindowSyncGroup

Adds a window synchronization group.

Syntax

hwIPage_handle AddWindowSyncGroup syncGroupName, windowIdList

Application

HyperWorks Tcl Modify

Description

This command adds a window synchronization group and defines the windows to be synchronized with it. The models in the windows will move in sync with mouse movement and all pre-defined views, once synchronization has been turned on.

Inputs

syncGroupName
Give your window synchronization group a meaningful name, or give it an ongoing number (for example, HW-SyncGroup1, SyncGroupModelBracket, or Page 1).
windowIdList
A list of window IDs to be 'synched' on the page. The list has to be in the following format: “window-ID window-ID” (“1 2 3 4")

Example

The following example will synchronize all windows on the current page. Please divide your current page into the desired number of windows and load a model into each window.
hwi OpenStack
hwi GetSessionHandle sess

sess GetProjectHandle proj
proj GetPageHandle pg [proj GetActivePage]
set numberOfWindows [pg GetNumberOfWindows]

set windowIdList ""
for { set i 1} { $i <= $numberOfWindows } { incr i } {
    lappend windowIdList $i

if { [string length $windowIdList] } {
    set syncGroupName "MyWindowSyncGroup"
    pg AddWindowSyncGroup $syncGroupName $windowIdList
    pgr SetWindowSyncGroupState $syncGroupName true; #activate window synchronization on this group
    puts "Current state  of $syncGroupName : [pg GetWindowSyncGroupState $syncGroupName]"

}
hwi CloseStack

Error

This command returns a warning code if a synchronization group with the same name already exists.