Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Is there any way to create a user defined parameter in the .asm file to capture quantities of parts then use that in a note?
I know you can get the quantity from the BOM but in I need more detailed because we use a lot of parts and subassembly so the subassembly can be shown in the BOM but not as a note in order to show it in the selected sheet of each part from the subassembly. currently we put this note manually so we have a several of issues
Solved! Go to Solution.
1. In this case you need to create model level parameter - item_no. Create in model "Name_001b" a parameter item_no = "b". Then change int table &asm.mbr.cparam.item_no to &asm.mbr.item_no and in the relations asm_mbr_cparam_item_no to asm_mbr_item_no
2. Table borders
How to hide internal borders, not outline
https://community.ptc.com/t5/3D-Part-Assembly-Design/Hide-table-border-lines/m-p/271391#M40548
To hide whole table you need to change border color. Need to set not printable color (print by white color on white paper). Depending on you pen table setting.
https://community.ptc.com/t5/3D-Part-Assembly-Design/table-color/m-p/43903
@DVsantacruz wrote:
Is there any way to create a user defined parameter in the .asm file to capture quantities of parts then use that in a note?
I know you can get the quantity from the BOM but in I need more detailed because we use a lot of parts and subassembly so the subassembly can be shown in the BOM but not as a note in order to show it in the selected sheet of each part from the subassembly. currently we put this note manually so we have a several of issues
Hi,
unfortunately I do not know of any simple solution.
You can do following manually:
I hope you can automate the above mentioned procedure using mapkey. Also you can ask someone to develop Toolkit application for you.
Use table with repeat region and summation. Place the table outside drawing frame. See the video
Thank you so much for you respond, It helped me a lot.... but look what I need is to add the real quantity not the sum of all the pieces... we currently have this note which they made long time ago, I put the &rep.qty in the #REQ value so it changed to the sum of all of them not just the 6, this value we put it manually
In drawing symbol do you want to show qnty = 6 for item - d ?
Of course! it should be 6 not 26, the sum of all the items is 26
Ok. For this we need find a way to link a note to the part by item_no or f_cat_id_no.
So, one more question:
I see you use f_cat_id_no parameter in symbol variable text: This parameter is a model parameter? Drawing parameter? Or asm level parameter?
For now I don't understand how you show part parameters in the symbol from dedicate item (for example, &DET, &THKNESS for item "a" or "b").
As I see we do a lot of hard work doing it all manually, so I got some additional questions, Is there a way to put the item automatically by alphabet? and to take the "&F_CAT_ID_NO" equal as the name of the part? but the main question here is how to add automatically the quantity of each item (rpt_qty) in the note instead of put manually "#REQ"?
Hi,
do you need to get something like this ?
See attached files created in Creo 4.0.
Thanks for your respond, it's pretty pretty similar it could work, Could you pls explain me how to make that kind of notes?
well in this case I'm guessing that I should put asm.mbr.name in the "#REG" parameter so it should change depending on the table, isn't it? but sadly it didn't work at all probably I did something wrong.
@DVsantacruz wrote:
Thanks for your respond, it's pretty pretty similar it could work, Could you pls explain me how to make that kind of notes?
well in this case I'm guessing that I should put asm.mbr.name in the "#REG" parameter so it should change depending on the table, isn't it? but sadly it didn't work at all probably I did something wrong.
Hi,
you cannot include repeat region parameters into note. You have to create custom symbol and use it to show BOM balloons related to repeat region. Please watch https://www.youtube.com/watch?v=6LZoXarSSyU video.
One more way. Replace drawing symbol by the table with repeat region.
item_no - is a component level parameter.
Create string parameter in the relations for the repeat region - DISPLAY.
This parameter will be drive the visibility the components in the table by item_no component parameter.
In the relations for repeat region
FILTER = 0
IF asm_mbr_cparam_item_no == DISPLAY
FILTER = 1
ENDIF
The filter for the repeat region:
&rpt.rel.filter == 1
ps: I'm not clear understand the structure of your assembly, but think this is close to what you asked.
Thank you so much for your response.
First at all, the structure of my assembly is
Name.asm
Name_001.asm subassembly
Name_001a
Name_001a
Name_001b
Name_002.asm subassmebly
Name_002a
Name_002b
an so on
So sometimes we put Name_001a and Name_002a into the same sheet and sometimes they (operators) dont have the main table to see the real qty of each item becuase they just have the printing sheet they're working, so that's why we put a custom symbol (a note) to each item into the drawing.
......
And second one. I have tried this one, and of course that's what I exactly need, it works, I just have a question right here (see image), how to set the "B" as the same name as the other ones, l mean all "Name_001b" is going to have "B" to avoid changing it one by one. and other question, can it be shown just as a text without the lines of the table?
1. In this case you need to create model level parameter - item_no. Create in model "Name_001b" a parameter item_no = "b". Then change int table &asm.mbr.cparam.item_no to &asm.mbr.item_no and in the relations asm_mbr_cparam_item_no to asm_mbr_item_no
2. Table borders
How to hide internal borders, not outline
https://community.ptc.com/t5/3D-Part-Assembly-Design/Hide-table-border-lines/m-p/271391#M40548
To hide whole table you need to change border color. Need to set not printable color (print by white color on white paper). Depending on you pen table setting.
https://community.ptc.com/t5/3D-Part-Assembly-Design/table-color/m-p/43903
Hi mates,
I just want to add this attributes that works for every level of the assemble, not just in the main level so you select Attributes, then clic on the table and select the following "No Duplicates", "Recursive", "Bln By Part", "No Cbl Info" and that's it
Thank you all.
Hi all,
As previous discussion participants had mentioned already
The good news is: there is 'Creo.JS' and its 'Testing Web Tool' - this is from Creo.JS User's Guide.
Here is a javascript code to run.
var columnNumberForRptQty = 2;
var paramNameForQty = "TEST_QTY";
var rowStartNumber = 2;
function MdlParamAssign( mdlObj, intValueToAssign) {
var param_val = pfcCreateIntParamValue(intValueToAssign);
if( !param_val){
return (false);
}
var paramObj = mdlObj.GetParam( paramNameForQty);
if (paramObj == null){
mdlObj.CreateParam (paramNameForQty, param_val);
paramObj=mdlObj.GetParam(paramNameForQty);
}
if( paramObj == null) {
return false;
}
try{
paramObj.Value=param_val;
}
catch (err){
return(false);
}
return( true);
}
function BomTableRowTextToMdlParam( table, currentRowNumber) {
var txt ="";
var cell = pfcTableCell.Create( currentRowNumber, columnNumberForRptQty);
if( ! cell) {
return(txt);
}
var qty = table.GetText( cell, pfcParamMode.DWGTABLE_NORMAL)
var mdl = table.GetCellReferenceModel(cell);
if( !mdl) {
txt = "Cannot get model object... Qty was extracted: " + qty;
return(txt);
}
var result = MdlParamAssign( mdl, qty);
if( result) {
txt += mdl.FullName + " : " + paramNameForQty + " ParamValue assigned: " + qty;
}
else {
txt = "===============Cannot create or modify model parameter for " + mdl.FullName;
}
return(txt);
}
function BomTableToMdlParams() {
// Click Run to execute this script
const session = pfcGetCurrentSession ();
var selBuff = session.GetCurrentSelectionBuffer();
var selected = selBuff.GetContents();
if( selected == null ) {
alert ("Must select BOM table...");
return;
}
if( selected.Count < 1 ) {
return;
}
selected.forEach( sel => {
let table = sel.GetSelItem();
if( ! table ) {
return;
}
let rowCount = table.GetRowCount();
for( var i = rowStartNumber; i <= rowCount; i++) {
let txt = BomTableRowTextToMdlParam( table, i);
print(txt);
}
});
}
BomTableToMdlParams();
This code will populate model level parameter with the value from BOM table cell
How to do it:
This is about all to it.
HIH.
FV.
Woow FV, This seems very complex, I'll try it but I have no idea how to open the CreoJ.C. I'll figure it out.
Thank you.
Hello all,
to open Creo.JS interactive shell :
while in web browser panel:
double-click on 'script_engine_testing.html' file.
HIH.