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: 

DesignViewRepresentation Object

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
DWhiteley
309 Views, 3 Replies

DesignViewRepresentation Object

Am I able to use the DesignViewRepresentation Object from the API in a part file, now that parts have design views.

I want to use the API to create a new design view in a part.

 

 

Thanks

 

Dave

Envisage

3 REPLIES 3
Message 2 of 4

Hi Dave,

 

Did you try "RepresentationsManager.DesignViewRepresentations.Add" ?

 

This returns a DesignViewRepresentation object and you can then set its properties. Please take a look at the help files for more details on DesignViewRepresentation object.

 

Hope this helps,

Philippe



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 4

Thanks  Philippe & this works with parts as well as assemblies?

 

Dave 

Message 4 of 4

yes I was quickly testing, it seems to work fine for both:

 

Public Sub addViewRep()

    Dim doc As Document
    Set doc = ThisApplication.ActiveDocument
    
    Dim compDef As ComponentDefinition
    Set compDef = doc.ComponentDefinition
    
    Dim rep As DesignViewRepresentation
    Set rep = compDef.RepresentationsManager.DesignViewRepresentations.Add
    

End Sub

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report