Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set a view in a drawing by size and not scale.

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
gazadder
1142 Views, 4 Replies

Set a view in a drawing by size and not scale.

I can control the size of my main drawing views using ilogic based on the models extents as there is a direct relationship between a parts length and the drawing view width. however, I have several isometric views that I scale according to the model size but in certain configurations of my model the ISO’s are completely the wrong scale for that particular view where the main views are ok.

 

I have a set area on my drawing sheet for the iso view and it would be more beneficial to control the size of the view rather than the scale of the view. Is this possible? I can read the height and width of a view so why can’t I control the size of a view but the height or width?

4 REPLIES 4
Message 2 of 5
gazadder
in reply to: gazadder

I have found a work around method but it's not ideal. Basically the ISO view is scaled from something that I know will make it smaller than the view size I want and then I say if it is less than the size of the view I want then increase it's scale slightly. Then I repeat this if statement until it has reached approximately the size I want. If anyone has a more direct method then please let me know.

 

ActiveSheet.View("DRIVE SIDE ISO").Scale = ActiveSheet.View("FAN_DRIVE_SIDE").Scale * 0.4

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 80

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 70

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 60

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 50

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 40

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 35

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 30

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 25

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 20

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 15

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 14

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 13

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 12

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 11

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 10

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 9

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 8

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 7

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 6

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 5

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 4

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 3

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 2

If ActiveSheet.View("DRIVE SIDE ISO").Height < 50 Then ActiveSheet.View("DRIVE SIDE ISO").Scale = 1 / 1

Message 3 of 5
Anonymous
in reply to: gazadder


@gazadder wrote:

"I can control the size of my main drawing views using ilogic based on the models extents as there is a direct relationship between a parts length and the drawing view width."


gaz, how do you do this? I'm trying to do the same thing, but can't quite figure out how to do it from the drawing level. Are you having to output the extents at the model level to a model parameter (or iproperty?) and then read that parameter at the drawing level?

 

I suppose if that is the case one could create an External Rule that outputs the Extents to some parameter or iProperty, so that way it works for old and new parts. I just thought it would be cleaner to do it straight from the drawing. If you have some code you can post, that would be awesome!

 

Thanks.

Message 4 of 5
gazadder
in reply to: Anonymous

Hi,

 

In your model after it has updated have 3 parameters update to the model extents as below:-

 

EXTENTS_LENGTH = Round(Measure.ExtentsHeight)
EXTENTS_WIDTH = Round(Measure.ExtentsLength)
EXTENTS_HEIGHT = Round(Measure.ExtentsWidth)

 

 

 

In the drawing rule I do as below:-

 

WIDTH = Parameter("FAN_MODEL.iam.EXTENTS_WIDTH")
SCALE_1 = 95/WIDTH

HEIGHT = Parameter("FAN_MODEL.iam.EXTENTS_HEIGHT")
SCALE_2 = 93/HEIGHT

LENGTH = Parameter("FAN_MODEL.iam.EXTENTS_LENGTH")
SCALE_3 = 85/LENGTH

MINIMUM_OF_SCALE_1_AND_2_AND_3 = MinOfMany(SCALE_1, SCALE_2, SCALE_3)
ActiveSheet.View("FAN_REAR_VIEW").Scale = MINIMUM_OF_SCALE_1_AND_2_AND_3

 

The 95, 93 and 85 are what I want the maximum physical size of my drawing views to be in mm.

 

Hope this helps.

Message 5 of 5
Anonymous
in reply to: gazadder

Thanks gaz! Yeah I ended up doing almost the same thing, except I used an array and sortarray to get the larger of the three measurements.

 

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

Post to forums  

Autodesk Design & Make Report