We use this procedure a great deal when attempting to enhance the performance of systems where SOLIDWORKS is having difficulty with importing or exporting geometry, or handling larger assemblies.
Please follow the links at the beginning of the articles for the detailed guides with code examples for connecting to SOLIDWORKS instance.Author: Chris Briand, CSWE, Javelin TechnologiesĪ kin to the article that our teammate, Josh Carrier, wrote back in 2010, I thought it high time we review the process of how to increase virtual memory on your workstation.
Run them under the same user to enable communication. one is run as administrator while other is not). Object might not be successfully retrieved form the ROT if the SOLIDWORKS application and the stand-alone application are run with different permission levels (e.g.
ROT enables interprocess communication with 3rd party applications by allowing to lookup the objects from the running processes via Windows APIs ( GetRunningObjectTable)īelow is an example of Running Object Table with several registered COM objects: When COM server creates an object instance it creates a moniker for this instance and registers it in the Running Objects Table (ROT). Method B - Running Object Table (ROT) Connecting by querying the COM instance from the Running Object Table (ROT)
It is not possible to create more than one active sessions of SOLIDWORKS.SOLIDWORKS Part Document OLE object in Excel This was designed to allow embedding OLE objects into the 3rd party applications (such as Microsoft Office). That means that session is started lightweight and no add-ins are loaded. If new session is created as the result of running this method this session will be invisible by default and started with /embed flag.when more than one SOLIDWORKS session is open) It is not possible to specify which of the running SOLIDWORKS sessions to connect to (e.g.It is not always predictable whether this method will connect to already running instance of SOLIDWORKS or will create new one.There are few limitations when using this method: The returned value is a string in the format: 25.1.0 where first number is a revision number. It is possible to get the revision number of SOLIDWORKS session via ISldWorks::RevisionNumber method. Please refer the table below for the list of SOLIDWORKS versions and its revision numbers: Version To use version specific program identifier it is required to specify the revision number after the program identifier, i.e. In this case your program will connect to the version last installed or modified in the computer. This would however introduce ambiguity where multiple versions of SOLIDWORKS are installed. If you use version independent identifier this will ensure that your code will be valid for any environment where SOLIDWORKS is installed. Version independent program identifier will be identical for all versions of SOLIDWORKS and equal to "SldWorks.Application". More information about this object (like type library class identifier, COM server location ) can be found at the registry branch related to the class identifier (i.e. In the example above program identifier of the SldWorks.Application.23 corresponds to the COM class identifier Program identifiers are registered in the Windows Registry: There are 2 type of program identifiers for SOLIDWORKS: version independent and version specific.
Method A - Activator and ProgId Connecting by creating an instance via Program Identified (progid) or Global Unique COM Cla ss Identifier (CLSID) Please follow the links below to access articles which demonstrate how to create a sample project and connect to SOLIDWORKS instance: This is optional detailed explanation of these approaches. C#, VB.NET, C++, Visual Basic 6) in order to utilize SOLIDWORKS API. In this article I will discuss 2 generic approaches connecting to SOLIDWORKS instance from the COM-compatible programming languages (e.g.