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.

Create String Parameter in Relations

geertdaenen

New member
At this moment we are trying to create a string parameter in the relations of a part-model. But we do have one issue we cannot solve.

We have 12 string parameters called V01, V02, V03,... ,V12
These parameters all have a value of one character like "K", "L", R"

Now we want to create one string parameter which is the combination of all 12 string parameters. So we have created this relation:
CODE= V01 + V02 + V03 + V04 + V05 + V06 + V07 + V08 + V09 + V10 + V11 + V12

This will give this result: "KKKLRLLLLKRL"

But now we would like to simplify this result: if there are 3 or more of the same characters next to each other, we want to have the number of the same characters instead of all characters. So the simple code has to be: "3KLR4LKRL"

I know, it's not an easy question. But I hope somebody can help me with it.
 
That is a tricky one: Perhaps you can get close with search and extract relations...

Let's say test=ttt08pp9

test2=search(test, "pp")
test3=extract(test, test2, 2)

in this case, test2 = 6 (the position of the condition in the string)
and test3 = pp

I'm not sure if this will get you everything you need in your situation, but at least be aware of these two relation tests. Good luck.
 

Sponsor

Articles From 3DCAD World

Back
Top