By: Tyler Griffin
You can set a parameter to equal only a portion of the part name. Below we have a part named "Parameters_123" and we want to set a parameter for the part name to equal "Parameters" and we want another parameter for the part number to equal "123". To do this we can setup the following relations:
PART_NAME=EXTRACT(REL_MODEL_NAME,1,
SEARCH(EXTRACT(REL_MODEL_NAME,1,
(STRING_LENGTH(REL_MODEL_NAME))),"_")-1)
After clicking ok and regenerating the model the parameter "Part_Name" is now set to "Parameters"
Next, to set the Part_No parameter we add the following relation:
PART_NO=EXTRACT(REL_MODEL_NAME,
(SEARCH(REL_MODEL_NAME,"_")+ 1),
((STRING_LENGTH(REL_MODEL_NAME))-(SEARCH(REL_MODEL_NAME,"_"))))
After clicking ok and regenerating the model the parameter "Part_No" is now set to "123"
Each relation should be entered on its own line (resulting in only two lines of relations from the above relations). These relations are looking for the underscore within the model name and extracting the string before the underscore for the part name and extracting the string after the underscore for the part number.
Comments
You can follow this conversation by subscribing to the comment feed for this post.