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: 

Replace Parameter Names

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
278 Views, 10 Replies

Replace Parameter Names

Has anyone written a utility they'd like to share that will replace all instances of a parameter name with another? We have one from our VAR that was done in v5.0 but it chokes if you have derived params. Thanks, -- Dave Hoder Product Design Engineer idX Seattle www.idxcorporation.com
10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

Hi Dave I am probably being dense here as usual but I am not following what you want. If you go into the params dialog and change the name of a param it should change everywhere it is used. -- Kent Keller http://www.KWiKMcad.com Autodesk Discussion Group Facilitator "Dave Hoder" wrote in message news:406b412f$1_3@newsprd01... > Has anyone written a utility they'd like to share that will replace all > instances of a parameter name with another? We have one from our VAR that > was done in v5.0 but it chokes if you have derived params. > Thanks, > > -- > Dave Hoder > Product Design Engineer > idX Seattle > www.idxcorporation.com > >
Message 3 of 11
Anonymous
in reply to: Anonymous

Multiple parts maybe? -- Rui "Kent Keller" wrote in message news:406b715e_2@newsprd01... > Hi Dave > > I am probably being dense here as usual but I am not following what > you want. If you go into the params dialog and change the name of a > param it should change everywhere it is used. > > -- > Kent Keller > http://www.KWiKMcad.com > > Autodesk Discussion Group Facilitator > > "Dave Hoder" > wrote in message news:406b412f$1_3@newsprd01... > > Has anyone written a utility they'd like to share that will replace > all > > instances of a parameter name with another? We have one from our VAR > that > > was done in v5.0 but it chokes if you have derived params. > > Thanks, > > > > -- > > Dave Hoder > > Product Design Engineer > > idX Seattle > > www.idxcorporation.com > > > > > >
Message 4 of 11
Anonymous
in reply to: Anonymous

Kent --> you can't change the name of a derived parameter, so if the program doesn't have an error-handler it will crash. I don't have the time now to look into this, but it shouldn't be that hard to program it. Teun "Kent Keller" wrote in message news:406b715e_2@newsprd01... > Hi Dave > > I am probably being dense here as usual but I am not following what > you want. If you go into the params dialog and change the name of a > param it should change everywhere it is used. > > -- > Kent Keller > http://www.KWiKMcad.com > > Autodesk Discussion Group Facilitator > > "Dave Hoder" > wrote in message news:406b412f$1_3@newsprd01... > > Has anyone written a utility they'd like to share that will replace > all > > instances of a parameter name with another? We have one from our VAR > that > > was done in v5.0 but it chokes if you have derived params. > > Thanks, > > > > -- > > Dave Hoder > > Product Design Engineer > > idX Seattle > > www.idxcorporation.com > > > > > >
Message 5 of 11
Anonymous
in reply to: Anonymous

For instance if you copy an assembly driven from a master part, & all parts use the parameter Length_1 in an equation somewhere. I need all parts in the new assy to use Length_2. I add this parameter to the master (be it a part or .xls) I need to change all references in each part from Length_1 to Length_2. Am I making sense? -- Dave Hoder Product Design Engineer idX Seattle www.idxcorporation.com "Kent Keller" wrote in message news:406b715e_2@newsprd01... > Hi Dave > > I am probably being dense here as usual but I am not following what > you want. If you go into the params dialog and change the name of a > param it should change everywhere it is used. > > -- > Kent Keller > http://www.KWiKMcad.com > > Autodesk Discussion Group Facilitator > > "Dave Hoder" > wrote in message news:406b412f$1_3@newsprd01... > > Has anyone written a utility they'd like to share that will replace > all > > instances of a parameter name with another? We have one from our VAR > that > > was done in v5.0 but it chokes if you have derived params. > > Thanks, > > > > -- > > Dave Hoder > > Product Design Engineer > > idX Seattle > > www.idxcorporation.com > > > > > >
Message 6 of 11
Anonymous
in reply to: Anonymous

How about setting Length_1 = Length_2 in the master file? "Dave Hoder" wrote in message news:40719c8e$1_3@newsprd01... > For instance if you copy an assembly driven from a master part, & all parts > use the parameter Length_1 in an equation somewhere. I need all parts in the > new assy to use Length_2. I add this parameter to the master (be it a part > or .xls) I need to change all references in each part from Length_1 to > Length_2. Am I making sense? > > -- > Dave Hoder > Product Design Engineer > idX Seattle > www.idxcorporation.com > "Kent Keller" wrote in message > news:406b715e_2@newsprd01... > > Hi Dave > > > > I am probably being dense here as usual but I am not following what > > you want. If you go into the params dialog and change the name of a > > param it should change everywhere it is used. > > > > -- > > Kent Keller > > http://www.KWiKMcad.com > > > > Autodesk Discussion Group Facilitator > > > > "Dave Hoder" > > wrote in message news:406b412f$1_3@newsprd01... > > > Has anyone written a utility they'd like to share that will replace > > all > > > instances of a parameter name with another? We have one from our VAR > > that > > > was done in v5.0 but it chokes if you have derived params. > > > Thanks, > > > > > > -- > > > Dave Hoder > > > Product Design Engineer > > > idX Seattle > > > www.idxcorporation.com > > > > > > > > > > > >
Message 7 of 11
Anonymous
in reply to: Anonymous

Length_1 does not equal Length_2. The new assembly is a different size or I may have added a new material thickness & have to change formulas to reflect this in a few dozen parts, etc. -- Dave Hoder Product Design Engineer idX Seattle www.idxcorporation.com "Udaya Gunasena (Autodesk)" wrote in message news:4071a060$1_3@newsprd01... > How about setting Length_1 = Length_2 in the master file? >
Message 8 of 11
Anonymous
in reply to: Anonymous

You described your problem as follows: "For instance if you copy an assembly driven from a master part, & all parts use the parameter Length_1 in an equation somewhere. I need all parts in the new assy to use Length_2. " In this case case you could simply rename Length_1 as Length_2 in the master and update the new assembly and all the derived parts should get the new name. This is the solution that Kent mentioned earlier. If, however, you want only some of the parts in the new assembly to be driven by Length_2 (and the other parts continue to be driven by Length_1) there are no simple short cuts. You would add Length_2 to the master and edit the driven parts to use Length_2 instead of Length_1. "Dave Hoder" wrote in message news:4071a546$1_1@newsprd01... > Length_1 does not equal Length_2. The new assembly is a different size or I > may have added a new material thickness & have to change formulas to reflect > this in a few dozen parts, etc. > > -- > Dave Hoder > Product Design Engineer > idX Seattle > www.idxcorporation.com > > "Udaya Gunasena (Autodesk)" wrote in message > news:4071a060$1_3@newsprd01... > > How about setting Length_1 = Length_2 in the master file? > > > >
Message 9 of 11
Anonymous
in reply to: Anonymous

So if I follow correctly, you are trying to build multiple sized assemblies off of 1 Master? Lenght_1 and Length_2 would be derived into every part in the assembly, but you don't want to manually open each file and from one to the other for the extrusion? Am I close. If so you could replace Length_1 and Length_2 in this with valid parameter names and batch process the files with my iBatchRun program Public Sub changeparam() Dim odoc As PartDocument Set odoc = ThisApplication.ActiveDocument Dim oparams As Parameters Dim oParam As Parameter Set oparams = odoc.ComponentDefinition.Parameters For Each oParam In oparams If oParam.Type = kModelParameterObject Then If oParam.Expression = "Length_1" Then If Not oparams.Item("Length_2") Is Nothing Then oParam.Expression = "Length_2" End If End If End If Next odoc.Update End Sub -- Kent Autodesk Discussion Group Facilitator "Dave Hoder" wrote in message news:4071a546$1_1@newsprd01... > Length_1 does not equal Length_2. The new assembly is a different size or I > may have added a new material thickness & have to change formulas to reflect > this in a few dozen parts, etc. > > -- > Dave Hoder > Product Design Engineer > idX Seattle > www.idxcorporation.com
Message 10 of 11
Anonymous
in reply to: Anonymous

Yes, this is the situation I am talking about. Each part may have the parameter Length_1 used in a formula in several features. It can be time consuming to find & edit each one. (of course, re-writing the parameters table, licensing Excel & using that as the engine might solve a lot of this ;) -- Dave Hoder Product Design Engineer idX Seattle www.idxcorporation.com "Udaya Gunasena (Autodesk)" wrote in message news:4071aff2_3@newsprd01... > If, however, you want only some of the parts in the new assembly to be > driven by Length_2 (and the other parts continue to be driven by Length_1) > there are no simple short cuts. You would add Length_2 to the master and > edit the driven parts to use Length_2 instead of Length_1. >
Message 11 of 11
Anonymous
in reply to: Anonymous

AWSOME! Thanks Kent! -- Dave Hoder Product Design Engineer idX Seattle www.idxcorporation.com "Kent Keller" wrote in message news:4071b2cd$1_3@newsprd01... > So if I follow correctly, you are trying to build multiple sized assemblies off of 1 > Master? Lenght_1 and Length_2 would be derived into every part in the assembly, but > you don't want to manually open each file and from one to the other for the extrusion? > Am I close. > > If so you could replace Length_1 and Length_2 in this with valid parameter names and batch > process the files with my iBatchRun program > > Public Sub changeparam() > > Dim odoc As PartDocument > Set odoc = ThisApplication.ActiveDocument > > Dim oparams As Parameters > Dim oParam As Parameter > > Set oparams = odoc.ComponentDefinition.Parameters > > For Each oParam In oparams > If oParam.Type = kModelParameterObject Then > If oParam.Expression = "Length_1" Then > If Not oparams.Item("Length_2") Is Nothing Then > oParam.Expression = "Length_2" > End If > End If > End If > Next > > odoc.Update > > > End Sub > > > -- > Kent > Autodesk Discussion Group Facilitator > > > "Dave Hoder" wrote in message > news:4071a546$1_1@newsprd01... > > Length_1 does not equal Length_2. The new assembly is a different size or I > > may have added a new material thickness & have to change formulas to reflect > > this in a few dozen parts, etc. > > > > -- > > Dave Hoder > > Product Design Engineer > > idX Seattle > > www.idxcorporation.com > >

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

Post to forums  

Autodesk Design & Make Report