jkalish
 |
| 20 Nov 2008 11:02 AM |
|
Does anyone know of a way to control the part and or instance name with parameters? For example: if I change a length paremeter, the part name would change to reflect the new length.
Thanks in advance...
Jon |
|
God bless America! |
|
|
SKWOK
 |
| 20 Nov 2008 11:26 AM |
|
You can do it from the formula editor. However, note that you can change part number with a formula, but not the filename. See attached part (change .txt to .CATPart). |
Attachment: 11120261351120.txt
|
Steven Kwok PLM Solutions Consultant CATIA V5 Instructor TechniGraphics Inc. CATIA V5 R16/17/18/19 CATVBA VB 6.0 Visual Basic .NET 2003/2005 |
|
|
jkalish
 |
| 20 Nov 2008 04:32 PM |
|
Steven, Thanks for the quick response, I appreciate it. I will mess around with the formulas and see if I cna make this work for my parts.
Jon |
|
God bless America! |
|
|
jkalish
 |
| 21 Nov 2008 07:22 AM |
|
Steven, I have a part that is metric, and the part number requires a "M" after each designation to indicate metric. For example: MHB-23M-19M-13M. Problem is Catia places a "mm" after each parameter entry and of course that's what shows in the part number as part of the formula. Is there a way to prevent Catia from placing the "mm" as a sufix? Thanks for your time, Jon |
|
God bless America! |
|
|
TPRICKETT
 |
| 21 Nov 2008 07:29 AM |
|
Looks to me like the reason for this is that the parameter is of type Length, which necessitates the units notation. I usually make my parameters of type Real, just a number with no units. Then to use in a formula requiring units, the formula would be something like "1mm * my_length".
--Tomm |
|
|
|
|
jkalish
 |
| 21 Nov 2008 09:11 AM |
|
Thanks Tomm, I did what you suggested, worked great. However, the part number requires a thread pitch designation. For example: if i need a fine thread, the part number prefix would have a "F" in the number, i.e., "MSHF". If a course thread is desired, then the part prefix would be "MSH". How would i create a formula that recognizes the difference? Would it be an "if" type command similar to an Excel formula? Or something completely different. Jon |
|
God bless America! |
|
|
SKWOK
 |
| 21 Nov 2008 09:23 AM |
|
Jon,
Writing "if" statements requires a knowledge license an access to the basic knowledge advisor workbench. By all means if you have access to this then you can write a rule dictating:
If ThreadTypeParam == Fine Then PartNumber = PartNumParam + "F" + LenParam Else PartNumber = PartNumParam + LenParam
(my syntax there probably isn't correct, I can fix it later if you have difficulty)
Otherwise, just type the "F" into the Part Number part of your Part Number? |
|
Steven Kwok PLM Solutions Consultant CATIA V5 Instructor TechniGraphics Inc. CATIA V5 R16/17/18/19 CATVBA VB 6.0 Visual Basic .NET 2003/2005 |
|
|
jkalish
 |
| 21 Nov 2008 09:32 AM |
|
Thanks Steven,
I am not sure if I have access or if we even have the workbench, I will look into that. Are you saying the only way to do this is through an "if" statement, or is there a "work-around"?
Jon |
|
God bless America! |
|
|
TPRICKETT
 |
| 21 Nov 2008 09:49 AM |
|
Maybe just make a parameter (type String) that contains "F" when you want fine pitch? Then partnumber = "MSH"+t_type+"12345-"+my_length If you don't want fine pitch, take the "F" out of the t_type parameter. |
|
|
|
|
jkalish
 |
| 21 Nov 2008 10:49 AM |
|
Thanks Tomm, Now for the next wrinkle, my part requires and thread pitch of 2.0 and the part number requires 2.0 not just 2, but Catia will not display the ".0" because it is a trailing zero. What is the syntax for decimal place display? Thanks again everyone. Jon |
|
God bless America! |
|
|
TPRICKETT
 |
| 21 Nov 2008 11:30 AM |
|
Not sure it would be worth it, but you could create a parameter (type=real) size_whole, another size_partial. Dimensional constraint = 1mm * (size_whole + (size_partial/10)), part number = "MSH"+t_type+"12345-"+size_whole+"."+size_partial But this would make changing your size awkward, and would only work for single-place decimal sizes. Seems to me it would make modification of the size totally non-intuitive, but maybe I'm wrong. |
|
|
|
|