-------------------------------------------------------------------------- Remote Communication with ZW3D -------------------------------------------------------------------------- You can send a command string to ZW3D from a command console using the following syntax: zw3d -r local cmd="this is my command string" Or, you can send the command to ZW3D from your separately running executable using the system() function as follows: system("zw3d -r local cmd=\"this is my command string\""); If ZW3D is not running, it will start ZW3D up and then execute the command. Otherwise, it will pass the command to the active instance of ZW3D. If you copy "zw3d.exe" from the ZW3D user folder to the folder your application is running from, you can pass the command string to the local copy of "zw3d.exe", which is a relatively small executable (~150 KB). "zw3d.exe" will locate the actively running instance of ZW3D and pass the command string to it. If it can't find a running instance of ZW3D, it will look for ZW3D in the active folder. If it doesn't find it there, it will look in the Windows registry for the last installed version of ZW3D. It will startup whatever version of ZW3D it finds first. A ZW3D command template can be executed using a command string composed of an exclamation character "!" followed by the template name. For example, the following command would start up ZW3D and execute the command template named "MyTemplate", presuming it was registered with ZW3D by the "Init" function of your ZW3D API DLL. zw3d -r local cmd="!MyTemplate" If a command is preceded by a tilda (~), it is assumed to be the name of a void function with void arguments (void function(void)). Passing this command string to ZW3D causes the specified function to be called, including custom functions implemented and registered by your ZW3D API DLL. zw3d -r local cmd="~MyFunction" The ZW3D GUI invokes the internal functionality of ZW3D via command strings. You can see the strings by typing "$report" (without quotes) in the ZW3D text input area. As you press icons and buttons in the ZW3D GUI, you will see corresponding command strings in the ZW3D message area. You can also send macro commands to ZW3D from a remote application. There is information on this topic in the online help for the ZW3D macro language (i.e. Design Automation Language) under the section named " "Passing Macro Commands to ZW3D from Remote Applications". This includes a mechanism for returning data queried using macro commands. You can remotely shut down ZW3D by send it the "CdPrjQuit4" command string. zw3d -r local cmd="CdPrjQuit4" You can bring up ZW3D in "hidden" mode (i.e. its window is not displayed) by including "-hide" in the ZW3D startup command. zw3d -hide You can bring up ZW3D with its window minimized using the "-minimized" argument. zw3d -minimized