Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hello, I have a question regarding relations:
I use following relation in model to show raw material dimensions in drawing BOM.
if NORMA == "9000010"
ROZMER = "-"
else
ROZMER="PL" + ITOS(LENGTH:FID_MEASURE_LENGTH_1) + "-" + ITOS(DISTANCE:FID_MEASURE_DISTANCE_1) + "X" + ITOS(DISTANCE:FID_MEASURE_DISTANCE_2)
endif
For normalized parts of a family table I need to suppress those dimensions by relation which filters all parts with a parameter "NORMA" stating with 90000 (not only 9000010).
Thanks in advance
Tom
Solved! Go to Solution.
Zdravím do Pelhřimova,
Greatings to Pelhrimov,
don´t know your exact situation, but will give you some generall tips.
Generall ideas:
- Is NORMA string or integer? Perhaps it is string type.
- you got some company NORMAs standards, that you have to insert in ProE logical relations ---> does it need more complex relation?
- what FORMs can be parameter NORMA? ---> Exampes: DIN933; CSN EN; 900010 and other internal company standards... ---> is my relation enough inteligent? ---> will be 100% funcionality in each possibilities options?
01) STRING type relation:
Princip:
- use EXTRACT function
- use help parameter NORMA_CATAGORY
- see ProE help or PTC community for more informations
Relation:
NORMA_CATEGORY=extract(NORMA,1,3)
IF NORMA_CATEGORY=="900"
ROZMER = "ABC"
ELSE
ROZMER="---"
ENDIF
-------------------------------------------------------------------------------------
02) INTEGER type relation:
Princip:
- use standard mathematical logic ---> IS it greater than 9000 AND smaller than 10000 ?
Relation:
IF NORMA >= 9000 & NORMA < 10000
ROZMER = "ABC"
ELSE
ROZMER = "---"
ENDIF
Hope it can helps you.
Greatings
Milan
Since NORMA is a string, you can use the SEARCH() function to see if part of it exists. For example,
IF SEARCH(NORMA, "90000") > 1
ROZMER = ""
ELSE
IF NORMA == "9000010"
ROZMER = "-"
ELSE
ROZMER="PL" + ITOS(LENGTH:FID_MEASURE_LENGTH_1) + "-" + ITOS(DISTANCE:FID_MEASURE_DISTANCE_1) + "X" + ITOS (DISTANCE:FID_MEASURE_DISTANCE_2)
ENDIF
ENDIF
Tom,
Thank you for so quick answer.
I tried to write a relation according to you, but the result is still the same. Below I put a printscreen of drawing boom where all three items with numbers in collumn "NORMA" should have "-" in collumn "ROZMER"
Is Rozmer a parameter in your model, or only in the repeat region? If you look at the cell properties at the top of that column, does it show something like &asm.mbr.Rozmer or &rpt.rel.Rozmer?
It is a model parameter ( &asm.mbr.Rozmer)
Zdravím do Pelhřimova,
Greatings to Pelhrimov,
don´t know your exact situation, but will give you some generall tips.
Generall ideas:
- Is NORMA string or integer? Perhaps it is string type.
- you got some company NORMAs standards, that you have to insert in ProE logical relations ---> does it need more complex relation?
- what FORMs can be parameter NORMA? ---> Exampes: DIN933; CSN EN; 900010 and other internal company standards... ---> is my relation enough inteligent? ---> will be 100% funcionality in each possibilities options?
01) STRING type relation:
Princip:
- use EXTRACT function
- use help parameter NORMA_CATAGORY
- see ProE help or PTC community for more informations
Relation:
NORMA_CATEGORY=extract(NORMA,1,3)
IF NORMA_CATEGORY=="900"
ROZMER = "ABC"
ELSE
ROZMER="---"
ENDIF
-------------------------------------------------------------------------------------
02) INTEGER type relation:
Princip:
- use standard mathematical logic ---> IS it greater than 9000 AND smaller than 10000 ?
Relation:
IF NORMA >= 9000 & NORMA < 10000
ROZMER = "ABC"
ELSE
ROZMER = "---"
ENDIF
Hope it can helps you.
Greatings
Milan
Greetings from Brno 🙂
Meanwhile I have already done a simple relation like following:
IF NORMA == "-"
ROZMER="PL" + ITOS(LENGTH:FID_MEASURE_LENGTH_1) + "-" + ITOS(DISTANCE:FID_MEASURE_DISTANCE_1) + "X" + ITOS (DISTANCE:FID_MEASURE_DISTANCE_2)
ELSE
ROZMER="-"
ENDIF
....that is enough for that case but thank you very much for the EXTRACT function explanation which I can use for another ones.
Tom