Server Controlled Publishing with swworker
When the Visualization server initiates a client request to convert SolidWorks data to the Creo View format, the server uses the swworker to convert the CAD data in a background session of SolidWorks. This Visualization server could be a Windchill server or another customized server environment.
The SolidWorks worker is an important link in achieving the full functionality of the Visualization server. For more information, refer to Visualization Server Definition.
SolidWorks 2021 fails to start when the PTC Worker Daemon runs as a service. To solve this issue, the configuration of sw2pv_config.exe creates the script file swrunInteractive.bat in the setup folder. Open the script file swrunInteractive.bat and check if SolidWorks runs in GUI mode. In addition, you need to respond to the dialog boxes that open in SolidWorks. Once you are done, you can continue using SolidWorks 2021 adapter in worker publishing.
swworker Overview
The SolidWorks worker is used to manage the relationship between SolidWorks and the Visualization server. swworker opens a non-graphical session of SolidWorks, and converts the CAD data to the Creo View format used by the Creo View client.
To configure the worker, you must know the Visualization server host name, the port number that the Worker Agent is listening on, and the complete path to the worker script swworker.
* 
Only one instance of SolidWorks can be run on a computer. If you are already running SolidWorks, swpublish, swbatch, or swworker, any attempt to run another swworker process will fail, displaying the following error:
sw2pv Fatal: SolidWorks is already running please exit SolidWorks first
Using swworker
* 
Users are strongly advised to first test their swbatch configuration before using the swworker. Troubleshooting swbatch is an easier way of identifying and resolving most issues that will also affect the worker.
The worker script is created in the <setup_directory>, and should be run by the Visualization server when starting the worker.
When configuring the Worker Agent to use this worker, use the following Execute Command:
<setup_directory>/swworker.bat
In our example, this command is:
C:/ptc/sw_setup/swworker.bat
* 
Do not use spaces in the setup directory name. In addition, the .bat extension should be used when the worker is on a Windows machine.
The adapter requires access to the desktop; otherwise, it will fail to start SolidWorks. To do this, when run locally the Worker Agent must be run using the Local System account with desktop access. When run remotely, the Worker Daemon must be run using the Local System account with desktop access.
To learn about configuring the Worker Agent to use this worker, refer to Visualization Server Definition.
Was this helpful?