Writing a SOLIDWORKS Routing API application typically involves:
-
Adding a reference to SOLIDWORKS version Routing Type Library. Substitute the current SOLIDWORKS version number for version. For VBA and COM applications, add a reference to the type library, install_dir\SWRoutingLib.tlb. For .NET applications, add a reference to the interop assembly, install_dir\api\redist\SOLIDWORKS.interop.SWRoutingLib.dll.
-
Instantiating a SOLIDWORKS connection.
-
Loading the SOLIDWORKS Routing add-in, if it is not already loaded, using the SOLIDWORKS ISldWorks::LoadAddIn method. The SOLIDWORKS Routing API DLL is sldrtadd.dll.
-
Opening a SOLIDWORKS assembly document that contains a route sub-assembly.
-
Using the SOLIDWORKS IAssemblyDoc::GetRouteManager method to get the SOLIDWORKS Routing API.
-
Getting the route.
-
Getting the cables and wires in the route.
-
Getting the route properties and editing the route.