Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assemply Cloning to adhere to a new numbering system 2

Status
Not open for further replies.

Smile9999

Mechanical
Jan 2, 2012
9
EG
I have a question about naming rule in cloning, I am trying to change the names of all the assemplies and subassemplies and parts to names of a new coding system we are supposed to use,

we have hundreds of parts and I dont want to manually change the name of each part,

example of old-new code conversion

old code 0200 - new code a12-00001-01
old code 0201 - new code a12-00002-01
old code 0202 - new code a12-00003-01

in the nx naming rule, there is only add prefix or add suffix, ,replace and renmae, the suffix and prefix is sufficient for adding a12- before text and -01 after text but not changing the number itself

as you can see its arranged 00001,00002,00003,00004,.... so I think I dont need to change every part manually but a way to recognize this pattern and apply it

plz can someone help me with this?
 
Replies continue below

Recommended for you

I think a journal/program is the way to go.

It is not easy to give a clear picture but here goes.

Initially you need to set up to do cloning. This would include:

ufs.Clone.Terminate()
ufs.Clone.Initialise(UFClone.OperationClass.CloneOperation)
ufs.Clone.SetDefDirectory(assemblydir)
ufs.Clone.SetDefAction(UFClone.Action.Clone)
ufs.Clone.SetFamilyTreatment(UFClone.FamilyTreatment.TreatAsLost)
Dim naming_failures As UFClone.NamingFailures = Nothing
ufs.Clone.InitNamingFailures(naming_failures)
response1 = ufs.Clone.AddAssembly(assembly1, loadStatus2)
ufs.Clone.SetDefNaming(UFClone.NamingTechnique.UserName)

Having collected all the parts that belong to the assembly you need to set the naming using something like:

ufs.Clone.SetNaming(part_array(i).FullPath, UFClone.NamingTechnique.UserName, outputPartName)


The part_array contains the parts. The outputPartName contains the cloned name

After the naming changes are all done then call

ufs.Clone.PerformClone(naming_failures)

Hope this is of some help to get you started.

Frank Swinkels
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top