The company I work for uses templates for our casting and machine drawings.
I'm wondering if there is a way to auto-fill some boxes on our template, most notably Author (works, but defaults to username of comp, not initials), and Scale (pulls scale from first drawing placed only).
Author uses the <DESIGNER> tag, and the Scale uses a custom tag in the iProperties menu. Company uses Inv. 2012.
Thanks in advance for the help.
Solved! Go to Solution.
The CAD Admin should have had users configure thier Tools > Application Options > General Tab > "Username" to be the user's intials. Then when a new file is created the Author and Designer iProperties are automaticly filled in correctly. Then it's filled out on the title block automaticly via <AUTHOR> or <DESIGNER> variables inserted from Drawing Properties.
If you want your scale iproperty fille out automatically from the first view placed you can use iLogic / VBA / Addin.
For iLogic you can use this:
' Define Document & First Sheet Dim oDrg As DrawingDocument = ThisDrawing.Document Dim oSheet As Sheet = oDrg.Sheets.Item(1) ' Check if there are any views on the sheet If oSheet.DrawingViews.Count = 0 Then Exit Sub End If ' Get the first view on the sheet Dim oView As DrawingView = oSheet.DrawingViews.Item(1) ' Update Scale iProperty iProperties.Value("Custom", "Scale") = oView.ScaleString ' Update Drawing to reflect changes InventorVb.DocumentUpdate()
Just set the rule to run every time the drawing is saved
Inventor > Manage Tab > iLogic Panel > Event Triggers button
If this solves your problem, please accept this as the solution.
How do you stop the code from overwriting a value (back to the scale of the first view inserted) if you have changed the scale manually?
Is there a code which reads whether a field has had a value inserted manually?
I'm sure there is other basic code which could achieve the same result, but I am new to this coding game so not too sure.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.