Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
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
that would be &rpt.qty in the BOM table repeat region
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.
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
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.
Nice Matthew
Excellent next step approach.
I was going to offer something similar but yours is better.
ron
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.
Thanks Don,
will it replicate in BOM?
My customer want it in BOM table only.
Regards,
manoj
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.
Thanks Don,
I will check it out.
Regards,
Manoj
Woo Hoo! Something new learned!
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
my requirement is to write as 8+4, instead 12. will Include function is that feasible.
//BR
Manoj
If you want it to show up as "8+4" instead of 12 you will need to write a relation for that.
from the above relations,
change to:
bom_qty = itos(rpt_qty) + '+4'
Ron
Ah, there it is. Awesome.
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.
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.)
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.
no AAX here...
back to the basics, dag nab it
Thank you all.
Appreciate your quick help.
Coming late to the discussion, but this was a similar thread where I only needed 1/2 of a part:
Interesting stuff here. While I don't have a use for it as yet, I'll have to check it out, thanks!
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.