Solid Body (Feature) default numbering

Solid Body (Feature) default numbering

Anonymous
Not applicable
573 Views
5 Replies
Message 1 of 6

Solid Body (Feature) default numbering

Anonymous
Not applicable

Is anyone aware of a way to change the default Numbering of features, Solid Bodies to be exact, without renaming after they are created? 

example:

Solid1, Solid2 to be Solid001, Solid002

0 Likes
574 Views
5 Replies
Replies (5)
Message 2 of 6

WCrihfield
Mentor
Mentor

You can specify the default prefix to use, instead of "Solid", by going into the Document Settings (Tools tab > Options panel), then to the Modeling tab of that dialog.  In the lower left area of the dialog at that tab, there is a section named "Naming Prefixing", and you can specify the prefix text for Solid Bodies and for Surface Bodies separately.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

If you want and have time, I would appreciate your Vote(s) for My IDEAS 💡or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 6

Anonymous
Not applicable

Yes, which is what i do for the Naming (just be "-") but what I am needing/asking-about is instead of a single digit count, having a 3 digit count like 001, 002, 003, 004, 005, and so on... so my Bodies would appear in the browser as -001, -002, -003 and so on... My "Make Components Dialog>Prefix is the project number, example: 11234 so my parts that are created are 11234-001, 11234-002, and so on... 

0 Likes
Message 4 of 6

WCrihfield
Mentor
Mentor

I know my post doesn't address the numbering side of body naming, but this was the only place I know of that related directly to part solid body naming in the part environment, so I just pointed it out for documentation purposes.  As far as I know, there still isn't any way to control that numbering portion of part body naming.  This certainly seems like an option that would be pretty popular, especially among those who regularly convert their multi-body parts into assemblies and/or separate parts.   My recommendation would be to search the Inventor Ideas Forum for other posts related to this topic, and vote for anything similar, then if none of them address this specific ability, you could create your own post there requesting that they add that specific ability.

If you do end up making your own Idea post, you could link it back here, so others can find it easier.

Here are a few related links:

https://forums.autodesk.com/t5/inventor-ideas/name-solid-bodies-when-creating-multi-bodies/idi-p/682... 

https://forums.autodesk.com/t5/inventor-ideas/re-use-body-names-in-derived-parts/idi-p/9481852 

https://forums.autodesk.com/t5/inventor-ideas/control-new-body-name-when-create-a-new-body/idi-p/596... 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 6

GosponZ
Collaborator
Collaborator

Try this rule. After - type 0. It is working for me for many years. It makes me part number  and description in browser tree

GosponZ_0-1626446349164.png

 
'check for custom iProperty and add it if not found
Dim prefix As String = "Prefix"
customPropertySet = ThisDoc.Document.PropertySets.Item _
("Inventor User Defined Properties")


Try
         prop= customPropertySet.Item(prefix)
Catch
       'Assume Error means Not found
            customPropertySet.Add("", prefix)
End Try


'write the part number to the Prefix iProperty if it is empty
If iProperties.Value("Custom", "Prefix") = "" Then
iProperties.Value("Custom", "Prefix") = iProperties.Value("Project", "Part Number") & "-"
Else 
End If


'check that this active document is a part file    
Dim partDoc As PartDocument
If ThisApplication.ActiveDocument.DocumentType <> kPartDocumentObject Then
MessageBox.Show ("Please open a part document", "iLogic")
End If


'define the active document
partDoc = ThisApplication.ActiveDocument
Dim solid As SurfaceBody
Dim i As Integer


'get input from user
prefix = InputBox("Enter a prefix for the solid body names", "iLogic", iProperties.Value("Custom", "Prefix"))


'write input back to custom iProperty 
iProperties.Value("Custom", "Prefix") = prefix
i = 1
'Rename all solid bodies incrementing suffix
For Each solid In partDoc.ComponentDefinition.SurfaceBodies
solid.Name = prefix + Iif(i < 10, "0" + CStr(i), CStr(i))
i = i + 1
Next

 

0 Likes
Message 6 of 6

Anonymous
Not applicable

This is what I am currently doing... the only downfall is that when you need to go back and create new parts, you lost the ability to use the code to automate it... 

0 Likes