iLogic to Set Model Scale to Best Fit

iLogic to Set Model Scale to Best Fit

rodney.pudneyTNG8B
Enthusiast Enthusiast
678 Views
2 Replies
Message 1 of 3

iLogic to Set Model Scale to Best Fit

rodney.pudneyTNG8B
Enthusiast
Enthusiast

I'm needing help creating some iLogic Code to set all my view scales to 'best fit'. 

 

I have created an iLogic Stair Bridge that will vary in height from 600mm to 3200mm.  I have my standard views laid out on my page but i'm needing lock the size of the viewport and then have the model scale to fit the viewport rather than the viewport scaling to suit the model as this causes the viewports to overlap.  

 

I'm very green with the iLogic/Inventor API so any suggestions will be very much appreciated. 

 

Regards


Rodney

0 Likes
Accepted solutions (1)
679 Views
2 Replies
Replies (2)
Message 2 of 3

rikard.nilsson
Collaborator
Collaborator
Accepted solution
Hi,

To set the scale of views to best fit is not that hard.
You just have to decide what size your view should have and the devide it by the model height.
Ex. 200/4300.
That will give you the view scale.

I hope I understood you right.

Regards
Rikard
0 Likes
Message 3 of 3

rodney.pudneyTNG8B
Enthusiast
Enthusiast

Thanks Rikard, 

 

I was trying to over complicate it.... that works perfectly! 

 

Rodney

0 Likes