Rotate drawing view

Rotate drawing view

NachoShaw
Advisor Advisor
832 Views
6 Replies
Message 1 of 7

Rotate drawing view

NachoShaw
Advisor
Advisor
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 automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

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.


0 Likes
833 Views
6 Replies
Replies (6)
Message 2 of 7

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes
Message 3 of 7

NachoShaw
Advisor
Advisor

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 automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

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.


0 Likes
Message 4 of 7

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes
Message 5 of 7

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes
Message 6 of 7

NachoShaw
Advisor
Advisor
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 automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

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.


0 Likes
Message 7 of 7

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes