• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

rename solids

  • Thread starter Thread starter MARCOC
  • Start date Start date

MARCOC

Guest
hi to all, here on the forum and also on internals I found several holograms to automatically rename the bodies, but no I find anything to rename the solids, I place an image for clarity1618652526419.webpDoes anyone know if possible, do I have something already? ? ?

I would need to rename the solid so
file name: pippo.ipt
bodies : pippo-001 eccc

solids : pippo_001 eccc

they differ only for the hyphen, because obviously inventor does not let you do it as it finds 2 equal names

Thank you very much
 

Attachments

  • 1618652462037.webp
    1618652462037.webp
    17 KB · Views: 3
hi, we had already made some discussions about it, see if this can do to your case
Good job
 
Good morning.
I'm back on this. I press that my programming knowledge is zero.
thanks to matteo hats I had downloaded the rule that I carry below:

syntaxeditor code snippetdim sb as surfacebody
dim doc as partdocument = thisdoc.document
dim sbs as surfacebodies = doc.componentdefinition.surfacebodies
dim sbname as string = thisdoc.filename(false)
dim suffix as integer = 1

' loop through all solid bodies, renaming them
for each sb in sbs
sb.name = sbname + "_item_" & cstr(suffix).padleft _
(len(cstr(doc.componentdefinition.surfacebodies.count)), 0)
suffix + 1
next

this rule when I execute it renames the various solids of the multibody part by applying the "filename" and adding as item_x+1 suffix. very useful.

Now I have another need. I would like to rename solids not with the nomdelfile but with the "description of the work" generating its solid. For example, I would like the first solid to be called "structural memory13". allego screenshot explanatory.
Is it feasible? If yes, how should I change the above rule?
probably the solution has already been posted but not chewing much what I am asking for more explicit support.
I thank everyone who wants to help me (ps.... all comes from a step of a customer)Screenshot_1.png
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top