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: 

Rotate drawing view

6 REPLIES 6
Reply
Message 1 of 7
NachitoMax
636 Views, 6 Replies

Rotate drawing view

Hi

I need to e able to click a base view and rotate it about its x,y,z instead of clockwise etc. example

Baseview is showing the FRONT view.
Click the view and it changes to TOP and updates (no dialogs)
Click again and it changes to back view
And so on. It always needs to rotate down by 90 degrees.

Can anyone help me on this please 🙂


Cheer

Nige

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


6 REPLIES 6
Message 2 of 7
adam.nagy
in reply to: NachitoMax

Hi Nigel,

 

Is this what you need?

http://adndevblog.typepad.com/manufacturing/2014/11/rotate-drawing-view-around-x-axis-of-sheet.html

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 7
NachitoMax
in reply to: adam.nagy

Hi

 

yes that works great 🙂 looking at the code, the UpVector is the only option? what if i wanted to go the other way or even rotate left or right? i couldnt see any other options aprt from UpVector

 

 

Thanks

 

Nigel

 

 

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Message 4 of 7
adam.nagy
in reply to: NachitoMax

Hi Nigel,

 

You can rotate any way you like, you just have to calculate the new Eye position and UpVector.

In this sepcific case it was enough to swap View direction and UpVector to achieve what we need.

If you wanted to e.g. rotate the model around the Y axis of the sheet you would only have to modify the Eye position, nothing else.

 

Btw my code was incorrect because the Target should stay the same - it's the Eye position that changes. Updated the blog post.

 

Cheers,

 

 



Adam Nagy
Autodesk Platform Services
Message 5 of 7
adam.nagy
in reply to: NachitoMax

I made a more generic blog post about it:

http://adndevblog.typepad.com/manufacturing/2014/11/rotate-camera-around-any-axis-any-angle.html



Adam Nagy
Autodesk Platform Services
Message 6 of 7
NachitoMax
in reply to: adam.nagy

Hi

In your updated code, which part would i change to make it rotate left, right, up or down?

Cheers

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Message 7 of 7
adam.nagy
in reply to: NachitoMax

Hi,

 

If you rotate around the sheet X then it goes either up or down depending on the angle you pass in. If you rotate around sheet Y then it goes left or right.

 

Cheers,



Adam Nagy
Autodesk Platform Services

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

Post to forums  

Autodesk Design & Make Report