I have several view representations in a Factory Assembly that I need to export as a DWG.
Can this easily be done using iLogic?
For example, I have Piping, HVAC, Cable Tray. These are all saved as representations just showing those systems. I want to be able to save all of these into a folder as Piping.dwg, HVAC.dwg, Cable Tray.dwg so that another 3rd party CAD system can pick and choose which to load into their model.
This is putting it simply, in reality I will have about 20 to do everyday and I want to automate the process with one click of a button.
Any advice will be much appreciated.
If i understand correctly you have a assembly and fromout that assembly you want to do the following:
Create a dwg for each view representation of your assembly model, and save this dwg into a certain folder automatically
Keep in mind there is other things you will run into. For example your view placement, scale and orientation needs to be defined in your code for each viewrep. As long as you don't need to annotate any dimensions, i'd say this is definently achievable. 2D's are more complex than 3D iLogic from my experience.
To clarify, this is a 3D assembly exporting 3D Solids into a DWG not drawings.
I don't have experience with 3D dwg so i can´t help. I do know it is possible to export different ViewRep and Level of Details to 2D so im sure it can be done to 3D aswell
Are we talking about design view representations?
Try this 🙂
Dim oAsm As AssemblyDocument = ThisDoc.Document For Each oRep As DesignViewRepresentation In oAsm.ComponentDefinition.RepresentationsManager.DesignViewRepresentations Try If oRep IsNot oAsm.ComponentDefinition.RepresentationsManager.ActiveDesignViewRepresentation Then oRep.Activate oAsm.SaveAs(ThisDoc.Path & "\" & oAsm.DisplayName & "_" & oRep.Name & ".dwg", True) Catch End Try Next
The dwg-files are samed to the same location as the assembly file so make sure the assembly is saved otherwise the code will fail due to no valid filepath 🙂
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website
Can't find what you're looking for? Ask the community or share your knowledge.