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: 

Change Design View in IDW

21 REPLIES 21
Reply
Message 1 of 22
ABishop
808 Views, 21 Replies

Change Design View in IDW

Can you edit a drawing view of an assembly and change the Design View via the API?
21 REPLIES 21
Message 21 of 22
djreesing
in reply to: ADNpati

First of all, my name is not Sanjay

 

I've tested it, and ActiveDesignViewRepresentation returns the name of the active design view. See example code below. It will let you select a view and then the name of the active design view is displayed in a messagebox.

 

Sub DesignViewRep()

    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oDrawingView As DrawingView
    Set oDrawingView = ThisApplication.CommandManager.Pick(kDrawingViewFilter, "Select a drawing view")
    
    MsgBox oDrawingView.ActiveDesignViewRepresentation

End Sub

 

Hope this helps.

 

Daniël

 

P.S. Next time please start a new discussion instead of cracking open one from years ago.

Message 22 of 22
ADNpati
in reply to: djreesing

Hello Daniel,

 

I posted here because somebody who is already gone thru my problem may help.

 

As you suggested, stared a thread here, please followup.

 

AD.

 

P.S   Your code is not working for DesignViewRepresentation of Assembly on a drawing sheet. Please Check.

Mechanical Engineer
Inventor Applications Engineer

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, Some KUDOS -

-------------------------------------------------------------------------------------

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

Post to forums  

Autodesk Design & Make Report