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

What is the PTC parameter for Quantity.

Highlighted
Newbie

What is the PTC parameter for Quantity.

Hello Creo Experts,

What is the PTC parameter for Quantity.

I want to create user define parameter which contain actual part quantity+spare quantity.

which need to replicated in BOM table as (4+8)

where 4=actual part quantity used in assemble

and 8=spare quantity delivered with product.

spare quantity will be user input.

Thanks you in advance

Best Regards,

Manoj

22 REPLIES 22
Highlighted

Re: What is the PTC parameter for Quantity.

that would be  &rpt.qty in the BOM table repeat region

Highlighted

Re: What is the PTC parameter for Quantity.

Thanks Ron St.Pierre,

How can assign the Value of quantity as actual quantity + spare.

so that my BOM quantity looks like 8+4.

somthing I will create Relation QTY= &rpt.qty+spare.

Highlighted

Re: What is the PTC parameter for Quantity.

Assuming you have a bom table, in the table tab > repeat region, select relations then your repeat region in the bom table.

A menu will come up where you can write some programming.

Put this in your relations:

bom_qty=rpt_qty+4

Then in your bom table, the first row of your repeat region, select it (if you select switch dims in the table relation menu, you will see the parameters)

we need to change what is being reported in the bom table

Right mouse button > report parametets

select rpt... > rel... > User Defined > type in bom_qty

switch your symbols back then update tables.

ron


Highlighted

Re: What is the PTC parameter for Quantity.

It's an unusual style, '8+4', but it's possible.  In the Local Parameters section of the Relations dialog for the repeat region, add a parameter 'bonus_qty', type string.  In the Relations, do something like

bonus_qty=""

if (asm_mbr_name == "BOLT2")

  bonus_qty="+4"

endif

(except of course with a condition+conditional that checks the parameter and constructs the desired string, not this proof-of-concept one)

And in the table cell, call them both out with "&rpt.qty&rpt.rel.bonus_qty".

Summary:  bonus_qty will generally be "" (empty string), but will be made to be "+#" when you have extra.

Highlighted

Re: What is the PTC parameter for Quantity.

Nice Matthew

Excellent next step approach.

I was going to offer something similar but yours is better.

ron

Highlighted

Re: What is the PTC parameter for Quantity.

For the components that are supposed to show additional items in the BOM table, use the Include function in the assembly rather than manipulating the BOM table.

Highlighted

Re: What is the PTC parameter for Quantity.

Thanks Don,

will it replicate in BOM?

My customer want it in BOM table only.

Regards,

manoj

Highlighted

Re: What is the PTC parameter for Quantity.

Yes, it will show up in the BOM. It will show in the Model Tree, but it will not be shown in the CAD model. I'm pretty sure the intent of the Include function is specifically for cases like yours. It's pretty easy to use, so, try it out.

Highlighted

Re: What is the PTC parameter for Quantity.

Thanks Don,

I will check it out.

Regards,

Manoj

Highlighted

Re: What is the PTC parameter for Quantity.

Woo Hoo!  Something new learned!

Don Senchuk

Got a question about that tho...

With respect to the initial question asked: would one have to "include" this item 4 additional times to fill the above requirement to properly report &rpt.qty as "12"?

Ron

Er..Never mind...

everyone writing at the same time.  Got it!  Thanks

Highlighted

Re: What is the PTC parameter for Quantity.

my requirement is to write as 8+4, instead 12. will Include function is that feasible.

//BR

Manoj

Highlighted

Re: What is the PTC parameter for Quantity.

If you want it to show up as "8+4" instead of 12 you will need to write a relation for that.

Highlighted

Re: What is the PTC parameter for Quantity.

from the above relations,

change to:

bom_qty = itos(rpt_qty) + '+4'

Ron

Highlighted

Re: What is the PTC parameter for Quantity.

Ah, there it is. Awesome.

Highlighted

Re: What is the PTC parameter for Quantity.

Having it show "8+4" is not something that Include will do. Using include would show "12".

For that, I'm pretty sure you'll need to do some relations and parameters inside the BOM table. I'm not certain of the way to get it to show 8+4. Everything I've tried just adds the two values together for a total.

Highlighted

Re: What is the PTC parameter for Quantity.

I just tried every relation trick I could think of and it always shows the total of "12" rather than "8+4".

The only other thing I can think of is a new BOM table with a column for the spares quantity. This could easily just show the "+4" and have the line between the two columns erased. (In this example, my assembly started with QTY 2; yours would show 8 instead of that 2.)

Highlighted

Re: What is the PTC parameter for Quantity.

Yes, it has to be included four times. I've used it very sparingly so I just went to test it. Pattern doesn't work, Repeat doesn't work and I'm not sure if another way exists. While four extra items is easy, I can't imagine using this if one has to include a piece a lot of extra times.

The "Creo Help" files are not helpful for this question.

The Knowledge Base has become maddeningly obtuse and appears to use a search algorithm from 1984.

I also just learned it requires Advanced Assembly.

Unbelievable.

Highlighted

Re: What is the PTC parameter for Quantity.

no AAX here...

back to the basics, dag nab it

Highlighted

Re: What is the PTC parameter for Quantity.

Thank you all.

Appreciate  your quick help.

Highlighted

Re: What is the PTC parameter for Quantity.

Coming late to the discussion, but this was a similar thread where I only needed 1/2 of a part:

1/2 of a part

(Remember this Frank Schiavone‌)

Highlighted

Re: What is the PTC parameter for Quantity.

Interesting stuff here.  While I don't have a use for it as yet, I'll have to check it out, thanks!

Highlighted

Re: What is the PTC parameter for Quantity.

Not tested, but I guess the following code will do the trick. Put it in repeat region relations.

IF exists("asm_mbr_spare_check")

    RR_SPAREQTY_CHECK=asm_mbr_spare_check

ELSE

    RR_SPAREQTY_CHECK=false

ENDIF

COPY_OF_SPAREQTY=asm_mbr_spare

IF COPY_OF_SPAREQTY<>"" & COPY_OF_SPAREQTY<>" " & RR_SPAREQTY_CHECK=true

    USER_QTY=rpt_qty+"+"+asm_mbr_spare

ELSE

    USER_QTY=rpt_qty

ENDIF

For the code to work &rpt.rel.USER_QTY needs to be defined in the repeat region column table, SPARE parameter needs to be defined on part level as a string, SPARE_CHECK parameter also at part level as boolean, and I think that's it.

If you don't like the SPARE_CHECK thing you can just weed it out, but I can't tell for sure the code is gonna work without it. Just have to test it.

Announcements