Writing a SolidWorks Routing API application typically involves:
-
Adding a reference to SolidWorks version Routing Type Library, which is located in disk:\<install_dir>\SWRoutingLib.tlb. (Substitute the actual SolidWorks Routing version number for version).
-
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 an electrical route sub-assembly.
-
Using the SolidWorks IAssemblyDoc::GetRouteManager method to get the SolidWorks Routing API.
-
Getting the electrical route.
-
Getting the cables and wires in the route.
-
Getting the route properties, editing the route, and re-routing the wires.