Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

numerate my dimension

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
eladm
1649 Views, 15 Replies

numerate my dimension

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

15 REPLIES 15
Message 2 of 16
mdavis22569
in reply to: eladm

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

Message 3 of 16
eladm
in reply to: mdavis22569

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

Message 4 of 16
johnsonshiue
in reply to: eladm

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
Message 5 of 16
eladm
in reply to: johnsonshiue

I want that the number will add automatic

i think the answear need to be iogic rule

Message 6 of 16
mdavis22569
in reply to: eladm

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

Message 7 of 16
eladm
in reply to: mdavis22569

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

Message 8 of 16
ThomasB44
in reply to: eladm

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

Message 9 of 16
eladm
in reply to: ThomasB44

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

Message 10 of 16
ThomasB44
in reply to: eladm

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

Message 11 of 16
ThomasB44
in reply to: ThomasB44

Hi @eladm

Does the rule I gave finally help you ?


Thomas
Mechanical Designer / Inventor Professionnal 2023
Inventor Professional EESignature

Message 12 of 16
eladm
in reply to: ThomasB44

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

Message 13 of 16
kelly.young
in reply to: eladm

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.

 

Message 14 of 16
Curtis_Waguespack
in reply to: eladm

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

 

 

 

Message 15 of 16
eladm
in reply to: Curtis_Waguespack

Hi Curtis

 

Thank you

 

best regards

Message 16 of 16
Anonymous
in reply to: kelly.young

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

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report