Quantcast
Channel: PTC Community: Message List - Creo
Viewing all articles
Browse latest Browse all 11377

Re: Table Relations - Search Function

$
0
0

Good, I took your example repeat region relation:

 

POSITION=search(asm_mbr_description,"SUB")

IF POSITION>0

     QUANTITY="--"

ELSE

     QUANTITY=rpt_qty

ENDIF

 

And then changed asm_mbr_desctiption to asm_mbr_name, and the relation verified succesfully.

 

So you could use this kind of relation:

 

POSITION=search(asm_mbr_name,"SUB")

IF POSITION>0

     QUANTITY="--"

ELSE

     QUANTITY=rpt_qty

ENDIF

 

But only if you are going to follow some sort of model naming convention that can always tell what models in your assembly are sub-assemblies. This might work if you are just trying to exclude the quantity in the resulting assembly component list (repeat region).

 

Or are you trying to do something else? I am not sure.

 

Anyway, as you can see, the search function in repeat region does not work for user defined parameters pulled from assembly models, such as asm_mbr_description, or DESCRIPTION on the model level. This function only works for system params like asm_mbr_name. That means you propably can't have the repeat region alone to care about all of your assembly parameters as you would like. I've tested your relation on both Creo Parametric 2.0 M020, and Pro/E WF4 M220, and it works as you describe, so this is propably not a bug.

 

Well, should I check Creo Parametric 2.0 M070 since I know PTC devs were messing with repeat region relations lately? I should, but that still won't make any difference for you as you are on WF4.

 

 

I don't know if you have to have this kind of DESCRIPTION parameter, and if you wouldn't be ok just with naming the sub assemblies in some sort of appropriate way so that your repeat region alone would be able to process it as you would like. If you really need to have this user defined DESCRIPTION parameter, and the resulting QUANTITY based of off that, then you could add a relation to all your parts, and subassemblies like this:

 

IF search(DESCRIPTION,"SUB")>0

   SUB_PREFIX_CHECK=true

ELSE

   SUB_PREFIX_CHECK=false

ENDIF

 

Part and assembly relations can handle the search function with no problem. Then you can modify your repeat region relation of the top level assembly drawing as shown on the following picture:

 

rr_relations.JPG

 

I am simply using a true or false check to either existing or not existing assembly parameter there, which seems to work as you can see on the picture.

 

There's a bunch of variations to both of these solutions, and I guess you are deep enough in this to know what you are really after. If you are still unsure about something, then let me know, and I can try to explain  further.


Viewing all articles
Browse latest Browse all 11377

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>