cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Basic Question: is it possible to rename a dimension with the name of a parameter (input param)?

nalexandru
12-Amethyst

Basic Question: is it possible to rename a dimension with the name of a parameter (input param)?

Hi,

Is it possible to rename a dimension with a parameter name defined in the "input" block in Pro/Program?

So to spare a relation like

d1=par1

 

Thanks,

Nic.

ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

you can define following INPUT section for your d1 dimension. In such case you can remove par1 parameter from your model.

 

INPUT
 D1 NUMBER
END INPUT

 

If you modify d1 dimension properties and change its symbol name from d1 to somethingelse, then you can define following INPUT section.

 

INPUT
 SOMETHINGELSE NUMBER
END INPUT


Martin Hanák

View solution in original post

17 REPLIES 17

d1 is a symbol.  You can made d1=anything.  But the dimension is still d1.

However, you can rename the symbol to something else.

It's simple enough to find out. Why don't you try it?

You'll find out that it will give you an error like "d1" already used. You can't have two things with the same name in a session. This applies to parts, assemblies, dimensions, parameters, etc. Creo (apparently) maintains a namespace with no duplicate names allowed. A name can refer to a lot of different things, but no two names can be identical.

Select the dimension and choose "properties" You can rename the dimension there.

BenLoosli
23-Emerald II
(To:nalexandru)

What I do for my family tables is to rename the d1 in properties to par1. Then add the input section of pro/program.

 

Hi,

 

you can define following INPUT section for your d1 dimension. In such case you can remove par1 parameter from your model.

 

INPUT
 D1 NUMBER
END INPUT

 

If you modify d1 dimension properties and change its symbol name from d1 to somethingelse, then you can define following INPUT section.

 

INPUT
 SOMETHINGELSE NUMBER
END INPUT


Martin Hanák

now that you put it on paper, seems really logical

Rename the dimension with whatever name you like and AFTER THAT, define the parameter with the same name in the "input" block!

I suppose it is not possible to have this thing for a dimension in a part mounted in an assembly, with the parameter defined in the assy:

"my_dimension" in part1 of the assy to be the same as "my_dimension" defined in the "input" block of the assy.

I will have to use the

my_dimension:1=my_dimension

in the "relation" block in the assy.

Am I correct?

Thank you again, Martin.

 

Nic.

Hi,

 

I am sorry I do not know "the best way" how to transfer values from assembly level to part level. Certainly, relation will work.


Martin Hanák

This is what the Execute command in Pro/Program is for.

I remember you explain it to me once (it was you, I believe) but I still didn't get it.

Hi, The two text files attached show the first few lines of the model's program. They provide a clear example of how parameters are passed from assembly to part and then used to set the dimensions of the part.

 

Using the same parameter name in both the assembly and the part input means you only have to enter a selected parameter value once upon regenerating the model.

so in the "execute" block you pass the three dimensions to the skeleton part

EXECUTE PART TB_ASSEMBLY_T1_000004_SKEL
TANK_BASE_LENGTH = TANK_BASE_LENGTH
TANK_BASE_WIDTH = TANK_BASE_WIDTH
TANK_BASE_KERB_HEIGHT = TANK_BASE_KERB_HEIGHT
END EXECUTE

does the names have to be the same?

is it possible to have:

EXECUTE

TANK_BASE_LENGTH = TANK_BASE_LENGTH_SKEL

for example?

Does this method have a particular advantage compared with what Kenneth sugested above? Just using relations and taking care of the identifier?

Hi,

 

The parameter name in the part does not have to be the same as in the assembly.

 

In the execute block the parameters on the left refer to part parameters while those on the right refer to assembly parameters. If you implement TANK_BASE_LENGTH = TANK_BASE_LENGTH_SKEL, then the value of the assembly parameter TANK_BASE_LENGTH_SKEL would be passed to the part parameter TANK_BASE_LENGTH. In this case the TANK_BASE_LEFT parameter should not be defined in the part's INPUT section. It should be used to assign the relevant dimension value in the part's RELATIONS.

 

The method described actually has nothing to do with renaming dimensions. It simply shows you the correct method for passing parameters using INPUTs in Pro/Program.

I understood that we went a bit off topic with this, but is also important to me.

To simplify:

you can have

EXECUTE PART part1

par=par

END EXECUTE

that passes the parameter "par" from the assy to the part1 and YOU DON'T HAVE THE "par" in the "input" bloc of the part.

If, for whatever reason, you don't want to have the same name of the parameter, you could have

EXECUTE PART part1

par_part=par_assy

END EXECUTE

and, again, you don't have the "par_part" defined in the "input" bloc of the part.

On the other hand, the above definition are equivalent with the relations:

RELATION

par:ID_PART=par:ID_ASSY

END RELATION

and, if you want different parameters names

RELATION

par_part:ID_PART=par_assy:ID_ASSY

END RELATION

Am I right?

Hi, You must implement the execute block in the assembly AND declare the parameter in the input block of the part. In the assembly you could have ...

LISTING FOR ASSEMBLY ASSEMBLY_A
INPUT
ASSEMBLY_PARAMETER_1 NUMBER
END INPUT

EXECUTE PART PART_1
PART_PARAMETER_1 = ASSEMBLY_PARAMETER_1
END EXECUTE

You MUST also have ...

LISTING FOR PART PART_1
INPUT
PART_PARAMETER_1 NUMBER
END INPUT

 

Try it out using a simple assembly with two or three parts.

 

The answer to your second question is no! Implementing the above definitions is not equivalent to using relations that rely on a session ID. The INPUT declaration in the part model does not tie the part to the assembly (the part remains independent of the assembly). Using the method with relations means the part is dependent on the assembly.

Thank you.

It is much more clear now.

Nic.


@jhaston-3 wrote:

 

Using the same parameter name in both the assembly and the part input means you only have to enter a selected parameter value once upon regenerating the model.


That's not true. Creo will ask for each "non-executed" INPUT parameter when you regenerate an assembly. The parameter names might be the same, but if you don't execute the input parameters, Creo will start asking questions 🙂

 

I do advice keeping the names the same, especially when you are executing several levels deep.

This is how I set dimensions or parameters in parts that I want to be controlled by the assembly. Just be aware that you have to find out the session ID number for the part, and can't assume they are in a specific order. The only sure thing I've found is that assemblies have odd (1, 3, 5, ...) and parts have even (0, 2, 4, ...) numbers.

Once you have defined a relation for a part from with in an assembly, like

 

length:2 = lengthAsm

 

If you load the assembly in another session, it could have another number for the left side of the equation, for example

 

length:22 = lengthAsm

 

It's not a concern, because Creo will take care of this for you. It apparently uses some sort of persistent means of identifying what the index refers to and corrects it if the part in question has a new index. There's likely a lot of reasons for this behavior, but I just accept it.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags