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
Solved! Go to Solution.
Solved by philippe.leefsma. Go to Solution.
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
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