Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

a Note with Qty of specific part

pradeep05

New member
Hi all,

Im looking for the solution as noted below,

Right now im using a custom symbol (which was developed long ago) showing part name & qty. But i need to manually entering / editing the part name and qty. After a long search, now im using "&model_name" in the part name field. Its now showing the actual part name like PAD_SUPPORT_1. Is there a way to exclude the "_"?

Secondly please help me to add the qty automatically. I tried to enter &rpt.qty in the QTY field. But its not working. consider im trying this in a drawing for an assy which is having 6 different parts.

Im using WF4.0

Thanks in advance.
 
We pursued this to , with no solution years ago. Maybe someone has a solution , but to my knowledge qty has to be pulled from the asm. Good luck with your quest.
 
A custom quantity BOM ballon should do the job.
As for removing the underscores, that will require a script I think.
 
what we use on legacy parts. Now we avoid the underscore.
this is placed in your bom relations

/*****REPLACE OR REMOVE UNDERSCORE*****
/* ASSIGN THE MODEL NAME TO A PARAMETER
old_name = asm_mbr_name

/* ASSIGN THE LENGTH OF THE STRING TO A PARAMETER
len = STRING_LENGTH(OLD_NAME)

/* SEARCH FOR THE FIRST UNDERSCORE AND ASSIGN ITS POSITION TO PARAMETER
pos = SEARCH(OLD_NAME, '_')

/* SEARCH() RETURNS ZERO IF NOTHING FOUND SO...
IF pos > 0
/* EXTRACT THE ORIGINAL NAME UP TO THE UNDERSCORE
bom_name = EXTRACT(old_name, 1, POS-1)
/* EXTRACT THE REMAINING STRING
rem = EXTRACT(old_name, pos+1, len-pos)
/* ADD THE DECIMAL POINT AND THE REMAINING STRING
/*bom_name = bom_name + '.' + rem
ENDIF

/* SINCE WE CANNOT WRITE ANY LOOP STATEMENTS
/* REPEAT THE CODE BELOW FOR THE MAX NUMBER
/* OF UNDERSCORES AS IS NECESSARY.
/* THE IF STATEMENT PREVENTS UNECESSARY
/* NUMBER CRUNCHING
/* EX: ABC_DEF_GHI_JKL HAS 3 UNDERSCORES
/* THE SECTION BELOW NEEDS TO EXIST TWICE

old_name = bom_name
pos = SEARCH(old_name, '_')
IF pos > 0
bom_name = EXTRACT(old_name, 1, pos-1)
rem = EXTRACT(old_name, pos+1, len-pos)
bom_name = bom_name + '.' + rem
ENDIF

/* REMEMBER TO CHANGE THE PART NUMBER TO
/* rpt.rel.bom_name

/* renaming a part
/*bom_name=asm_mbr_name

adjust as needed for your use

ron
 

Sponsor

Articles From 3DCAD World

Back
Top