Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

a Note with Qty of specific part

  • Thread starter Thread starter pradeep05
  • Start date Start date
P

pradeep05

Guest
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.
 
For the part number you are better off creating a parameter that doesn't have the underscores in it.
 
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
 

Part and Inventory Search

Sponsor

Back
Top