numerate my dimension

eladm
Collaborator
Collaborator

numerate my dimension

eladm
Collaborator
Collaborator

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

number.GIF

it think it is a rule

 

best regards

Reply
Accepted solutions (1)
1,863 Views
15 Replies
Replies (15)

mdavis22569
Mentor
Mentor

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


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

0 Likes

eladm
Collaborator
Collaborator

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

0 Likes

johnsonshiue
Community Manager
Community Manager

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!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

eladm
Collaborator
Collaborator

I want that the number will add automatic

i think the answear need to be iogic rule

0 Likes

mdavis22569
Mentor
Mentor

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.

 

 


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

0 Likes

eladm
Collaborator
Collaborator

correct , only after all the dimensions is in the drawing I will run the rule. the ordef not impornent (for now)

0 Likes

ThomasB44
Mentor
Mentor

Hi @eladm

Here an example of a rule to add an unique number to each dimension.

It doesn't add a balloon style...Smiley Embarassed

 

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" Smiley Tongue


Thomas
Mechanical Designer / Inventor Professionnal 2025
Inventor Professional EESignature

eladm
Collaborator
Collaborator

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

0 Likes

ThomasB44
Mentor
Mentor

Yes, I realised that I forgot the line, so I've edited my post Smiley Wink

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
Inventor Professional EESignature

ThomasB44
Mentor
Mentor

Hi @eladm

Does the rule I gave finally help you ?


Thomas
Mechanical Designer / Inventor Professionnal 2025
Inventor Professional EESignature

eladm
Collaborator
Collaborator

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

kelly.young
Autodesk Support
Autodesk Support

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

Increment.PNG

 

 

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.

 

0 Likes

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi eladm,

 

Building on what ThomasB44 provided, here is a version that uses Inventor's built in Inspection Dimension tools to do this.

 

Inspection Dims.PNG

 

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

 

 

 

eladm
Collaborator
Collaborator

Hi Curtis

 

Thank you

 

best regards

0 Likes

Anonymous
Not applicable

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

picture.PNG

0 Likes