iLogic Automatic Drawing view Scale Label

iLogic Automatic Drawing view Scale Label

jpchaisson
Advocate Advocate
4,759 Views
6 Replies
Message 1 of 7

iLogic Automatic Drawing view Scale Label

jpchaisson
Advocate
Advocate

what i am trying to do is create an iLogic rule that if your drawing view scale is set to the following ...

 

1:1, 1:2, 1:4, 1:8, 1:12, 1:!6, 1:24, 1:32, 1:48, etc. on the view label for that view it will diplay ...

 

SCALE: 1/2" = 1'-0"

 

and so on for the rest for the standard scale factors.

 

i know it will be some sort of a loop and it needs to check all views when ran for any changes.

 

i have never done any coding for the drawing side of inventor yet only model coding so an help will

be greatly appreiciated.

0 Likes
Accepted solutions (1)
4,760 Views
6 Replies
Replies (6)
Message 2 of 7

jdkriek
Advisor
Advisor

Much simpler solution

 

In your drawing template got to your style editor

 

Click on your standard. In the general tab you will see "Preset Values" section.

 

Change the dropdown to "Scale"

 

Here you can enter all the scales that you want to be available for views.

 

See attached 😉

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 7

jpchaisson
Advocate
Advocate

for as long as i have been using inventor i never knew you can call your scale factor out that way. still learning everydaySmiley Happy

0 Likes
Message 4 of 7

jdkriek
Advisor
Advisor
Accepted solution

Just for the heck of it, thought I would write your orginal request for your legacy drawings 🙂

 

Note, I only included "1 : 1" with the spaces in between, you can change this to "1:1" if yours is currently displayed like that. Add more by adding more "Cases". Always leave the "& Chr(34)" on the end.

 

Dim oApp As Application: oApp = ThisApplication
Dim oDoc As DrawingDocument: oDoc = oApp.ActiveDocument

Dim oSheets As Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView

oSheets = oDoc.Sheets

For Each oSheet In oSheets
oViews = oSheet.DrawingViews
	For Each oView In oViews
		Select Case ActiveSheet.View(oView.Name).ScaleString
			Case "1 : 1"
            ActiveSheet.View(oView.Name).ScaleString = "1'=1'-0" & Chr(34)
		End Select
    Next
Next

 

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 5 of 7

jpchaisson
Advocate
Advocate

Thank you so much for the extra effort in writting me the code. its people like you that are helping me to understand the Inventor API.

Message 6 of 7

jdkriek
Advisor
Advisor

You're quite welcome JP Cat Wink

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


0 Likes
Message 7 of 7

Anonymous
Not applicable

I also can't change my scale format in Inventor Prof 2012. I want to open a sheet with scale 1:2 but there is only 1:1 , I tired to change by using edit sheet option but I couldn't manege it 😞 i need some help.

 

Sinan KAYA

0 Likes