Hi Inventor users
Is someone have an idea how to numerate all my drawing dimensions ?
After I finished my drawing , I want to add number near each dimension
it think it is a rule
best regards
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
I've not seen a way ...
Maybe to help some of us better understand...
What's the end goal/reasoning for it?
Might be a different solution possible
Hi
The main goal is to add number near each dimension 1,2,3,4 ....
(if I have 12 dimensions in the drawing(idw file) i will have 1,2,3 ... 12 )tommorw I will add one more dimension the number 13 will be add near this dimension . it can be like a symbol number inside a circle
regads
Hi! I guess you can use a sketch symbol. If this particular sheet only contains drawing views of a part, you could use Balloon command to do that and override each number manually.
Many thanks!
I want that the number will add automatic
i think the answear need to be iogic rule
If you could do iLogic, how does it know the order?
You would need to run the rule after each dimension is added then ...
What happens if they use the auto-retrieve dimensions, that would / could conflict with the iLogic.
correct , only after all the dimensions is in the drawing I will run the rule. the ordef not impornent (for now)
Hi @eladm
Here an example of a rule to add an unique number to each dimension.
It doesn't add a balloon style...
SyntaxEditor Code Snippet
Dim oDrawingDoc As DrawingDocument If ThisApplication.activeDocument.DocumentType <> kDrawingDocumentObject Then Return Else oDrawingDoc = ThisApplication.activeDocument End If Dim oSheet As Sheet oSheet = oDrawingDoc.ActiveSheet Dim oDims As DrawingDimensions oDims = oSheet.DrawingDimensions Dim oDim As DrawingDimension Dim oDimText As DimensionText Dim i As Long i = 1 For Each oDim In oDims oDimText = oDim.Text oDimText.FormattedText = "<DimensionValue/>" & " ( " & i & " )"
i = i + 1 Next
Edit : I forgot to add the line with "i = i + 1"
Thomas
Mechanical Designer / Inventor Professionnal 2025
Hi Thomas
Thnank you very much
did you forget to add the line ? i = i + 1
it not working to hole and thread notes (it must be because thay act different from dimension )
best regards
Yes, I realised that I forgot the line, so I've edited my post
To add the thread notes please see the new rule :
SyntaxEditor Code Snippet
Dim oDrawingDoc As DrawingDocument If ThisApplication.activeDocument.DocumentType <> kDrawingDocumentObject Then Return Else oDrawingDoc = ThisApplication.activeDocument End If Dim oSheet As Sheet oSheet = oDrawingDoc.ActiveSheet Dim oDims As DrawingDimensions oDims = oSheet.DrawingDimensions Dim oDim As DrawingDimension Dim oDimText As DimensionText Dim i As Long i = 1 For Each oDim In oDims oDimText = oDim.Text oDimText.FormattedText = "<DimensionValue/>" & " ( " & i & " )" i = i + 1 Next Dim oThreadNotes As HoleThreadNotes
oThreadNotes = oSheet.DrawingNotes.HoleThreadNotes
Dim oThreadNote As HoleThreadNote For Each oThreadNote In oThreadNotes oDimText = oThreadNote.Text oDimText.FormattedText = "<DimensionValue/>" & " ( " & i & " )" i = i + 1 Next
Thomas
Mechanical Designer / Inventor Professionnal 2025
Hi Thomas
It help a-lot , I see that if the first dimension deleted and run the rule again , the 2nd dimension get the number 1 and so on ,it is wonderful start .it look simple and very good
Hello @eladm I used to use this in the aerospace industry when marking drawings with bubbles for inspection. Although that way is pretty sweet you might have it where some dimensions you don't want inspected or need to re-number, I can see it being hard to edit or customize.
Thought I would recreate how I used to do it and share. Found a bit of code by @mcgyvr that might work for this.
I can't remember how to get it to Run the Rule on Sketch Symbol Placement, but as you can see from the screencast it is very close.
INCREMENTCurrent = iProperties.Value("Custom", "INCREMENT")
INCREMENTNew = INCREMENTCurrent + 1
iProperties.Value("Custom", "INCREMENT") = INCREMENTNew
RuleParametersOutput()
iProperties > Custom Tab > Name: INCREMENT, Type: Number, Value: 1
Annotate > Symbols > Define New Symbol
Maybe someone with advanced iLogic experience can add the final touches? I had it years ago where every placement would automatically increase the number ready for the next placement but can't remember the last bit. Thanks!
Please select the Accept as Solution button if a post solves your issue or answers your question.
* Ideas * Help * AKN * Updates * Pack & Go * Reset Utility * Repair Install * Customization * iLogic Examples * Autodesk University *
Hi eladm,
Building on what ThomasB44 provided, here is a version that uses Inventor's built in Inspection Dimension tools to do this.
Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim oDrawingDoc As DrawingDocument If ThisApplication.activeDocument.DocumentType <> kDrawingDocumentObject Then Return Else oDrawingDoc = ThisApplication.activeDocument End If Dim oSheet As Sheet oSheet = oDrawingDoc.ActiveSheet
Dim oDims As DrawingDimensions oDims = oSheet.DrawingDimensions Dim oDim As DrawingDimension Dim i As Long i = 1 For Each oDim In oDims oDim.IsInspectionDimension = True oDim.SetInspectionDimensionData _ (InspectionDimensionShapeEnum.kRoundedEndsInspectionBorder, i) i = i + 1 Next Dim oThreadNotes As HoleThreadNotes oThreadNotes = oSheet.DrawingNotes.HoleThreadNotes Dim oThreadNote As HoleThreadNote For Each oThreadNote In oThreadNotes oThreadNote.IsInspectionDimension = True oThreadNote.SetInspectionDimensionData _ (InspectionDimensionShapeEnum.kRoundedEndsInspectionBorder, i) i = i + 1 Next
I found this really helpful for me, but the problem is that when I save .idw and open it again, all numbers change to the last value. Is there some solution which should I add to the current code?
Thanks
Can't find what you're looking for? Ask the community or share your knowledge.