Hi guys.
I have multiple sheets in the same drawing file. In each sheet a different part will be detailed, ok here.
So, for each detailed drawing sheet I would like to have an ilogic automatic fill the field of scale of the title block, according with the respective part placed in the sheet.
For example, i have two parts detailed in the same file, but in the diferent sheets, ok? In the first sheet I have a placed view of the one part in 1:1 scale, but in the second sheet the other part have an view placed with 1:2 scale. So, in the each title block sheets will have an diferent scale automatic filled.
Print screen attached.
Thanks for any help.
Solved! Go to Solution.
Solved by ewiggers. Go to Solution.
Hello,
May I point out something about the drawing technique you apply here. When you check the drawing standard about scale (don't know the NEN-ISO number by head at this moment but I can look it up later). It describes that the titleblock on each sheet should contain the main scale of the drawing. For each different scale on a view the scale should be included into the view label.
If I understand it correct, you put multiply parts into one drawing, for what purpose? Why don't you put each part or assembly into a single drawing file, with its unique number etc.
At our company we use a rule for scale automation, but it puts the main drawing scale into the titleblock. I think it will be possible to achieve what you have in mind. You have to create a Prompted Entry field in your titleblock. Create a iLogic rule that will get the scale from the view on each sheet and put that text into the Prompted Entry field.
Regards,
Eelco
Hello,
Just tested it and the code below wil do the job for you.
Do the following:
- Create a prompted entry "Scale" in your titleblock definition(s).
- Create a new rule "SetScale" or whatever name you like.
- Insert the code below into that rule.
- Set the event trigger Before Save Document for this rule.
Code:
Option Explicit ' Set the scale on each sheet individual Try Dim oActiveDoc As Document = _ TryCast(ThisApplication.ActiveDocument, Drawingdocument) Dim sScaleText As String ' Check if activedoc is nothing, if so than exit If (oActiveDoc Is Nothing) Then Exit Sub ' Loop thru the sheets and get scale from the first view For Each oSheet As Sheet In oActiveDoc.Sheets If (Not oSheet.DrawingViews.Count = 0) Then sScaleText = oSheet.DrawingViews(1).ScaleString.ToString For Each oTextBox As TextBox In oSheet.TitleBlock.Definition.Sketch.TextBoxes If (Strings.Left(oTextBox.FormattedText, 7) = "<Prompt") Then If (Strings.Instr(oTextBox.FormattedText, "Scale", _ Microsoft.VisualBasic.CompareMethod.Text) <> 0) Then oSheet.TitleBlock.SetPromptResultText(oTextBox,sScaleText) End If End If Next oTextBox End If Next oSheet Catch ex As Exception MsgBox("Error info: " & vbNewLine & ex.Message, vbOKOnly, "Error: SetScale") End Try
Regards,
Eelco
Eelco,
It works!
One more thing, when I place a new sheet through "Drawing Resources" → "Sheet Format" the "prompt entry text box" open automatically and request the value. Off course, I not fill it and I made only CANCEL or OK, then rule that you made work when I place one view.
But, how made to not show the "prompt entry text box" when I place a new sheet?
file attached
Regards
Bruno
Hi brunobiazotti,
I have been looking into that earlyer but it is not possible to suppres or not show the prompted entry dialog when inserting a sheet. This is part of the insert sheet command in Inventor and is hard coded.
I found a solution for our company, not because we use prompted entry's but to make use of the default Inventor border. When you use the default border in your drawings, Inventor let you adjust the sheet margins when you choose insert Default Border from the drawing resources folder. But when you change the sheet size after the sheet is inserted, Inventor sets back the sheet margins to standard values and they are hard coded and not adjustable. Unfortunaly they didn't meet the drawing standard for sheet margins and they set the sheet margins to 10 mm on all sides for A4 to A2 and for A1 to A0 they set the margins to 20 mm on all sides. I have reported that as an issue and they will fix it somewhere in a future release.
For your purpose you must create an iLogic rule that inserts a new sheet. You can create a dialog with a combobox where the user can choose the sheet sizes from and according that choice insert the approate sheet with border and titleblock. Within the rule get the prompted entry textbox and fill it with an empty string and use the command AddTitleBlock to add the titleblock with prompted entry's to the sheet. This way the prompted entry dialog will not appear.
Regards,
Eelco