Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Export Representations in DWG format

4 REPLIES 4
Reply
Message 1 of 5
martin.emmersonQMTXY
345 Views, 4 Replies

iLogic Export Representations in DWG format

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.

Tags (2)
Labels (1)
4 REPLIES 4
Message 2 of 5

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.

Message 3 of 5

To clarify, this is a 3D assembly exporting 3D Solids into a DWG not drawings.

Message 4 of 5

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

Message 5 of 5
JhoelForshav
in reply to: Daan_M

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 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report