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: 

iLogic Automatic Drawing view Scale Label

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
jpchaisson
4159 Views, 6 Replies

iLogic Automatic Drawing view Scale Label

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.

6 REPLIES 6
Message 2 of 7
jdkriek
in reply to: jpchaisson

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
in reply to: jdkriek

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

Message 4 of 7
jdkriek
in reply to: jpchaisson

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
in reply to: jdkriek

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
in reply to: jpchaisson

You're quite welcome JP Cat Wink

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


Message 7 of 7
e167691
in reply to: jpchaisson

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

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

Post to forums  

Autodesk Design & Make Report