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 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.