cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

AFX search mdl ref in the component of a main assy

YaroslavSin
17-Peridot

AFX search mdl ref in the component of a main assy

Hello.

It is possible to find a reference in the component of a main assembly?

Using SEARCH_MDL_REF I'll try to find a CSYS in the skeleton part of a assembly.

I know about SEARCH_MDL_REF ASSEMBLY....

But how to search in sub-components of this assembly?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @YaroslavSin ,

 

that will also work, but you need to take a few steps to make it happen.

  • Skeleton must be in your active assembly
  • Skeleton needs a component parameter called BUW_OBJECT_ROLE value is of your choosing, but for this example I went with "skeleton"
  • Use SEARCH_SUBCOMP_REF to find the required reference.

See structure:

modeltree.png

 

See also example code:

 

 

BEGIN_ASM_DESCR 
	SEARCH_MDL_REF THIS_283 CSYS CS0 CSYS_FOUND
	SEARCH_SUBCOMP_REF ASSEMBLY SKELETON CSYS CS0 CSYS_TO_ALIGN
	CONFIG_ELEM
	
	ASSEMBLE THIS
		CSYS CSYS_TO_ALIGN CSYS_FOUND
	END_ASSEMBLE
END_ASM_DESCR 

 

 

PFA also a litte demo component that you can use (Created in Creo 7).

 

I hope this is what you were looking for.

 

Greetings Sam

 

Samuel Brantner
B&W Software GmbH

View solution in original post

5 REPLIES 5

Have you attempted to include sub models in the search criteria?

 

• Look in (Available in Assembly and Drawing mode only) Select the active model. If the scope of your selection is already defined, this field is not displayed. The arrow button allows you to select the desired model from the graphics window or the Model Tree. Click the Include submodels check box to search the sub-models of the Look In model.

 

tbraxton_0-1646506591832.png

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Hi @YaroslavSin ,

what you want to do is possible.

 

Here the Syntax:

SEARCH_MDL_REF THIS_283 CSYS CS0 CSYS_FOUND

 

In the elements Modeltree show column FEAT ID to get the required number after the THIS_ statement.

 20220307110906.png

 

Little Demo Tab file code:

 

BEGIN_ASM_DESCR 
	SEARCH_MDL_REF THIS_283 CSYS CS0 CSYS_FOUND
	CONFIG_ELEM
	
	ASSEMBLE THIS
		CSYS CSYS_TO_ALIGN CSYS_FOUND
	END_ASSEMBLE

END_ASM_DESCR 


BEGIN_GUI_DESCR
	USER_SELECT	CSYS	CSYS_TO_ALIGN	1
END_GUI_DESCR

 

 

Hope this helps.

 

Greetings Sam

 

 

 

Samuel Brantner
B&W Software GmbH

Hello Samuel,

I can found component in the equipment assy, but no success to find skeleton part in main assy.

 

please clarify, THIS_# statement can search in the assembly into which the user places equipment part/assy ?

Hi @YaroslavSin ,

 

that will also work, but you need to take a few steps to make it happen.

  • Skeleton must be in your active assembly
  • Skeleton needs a component parameter called BUW_OBJECT_ROLE value is of your choosing, but for this example I went with "skeleton"
  • Use SEARCH_SUBCOMP_REF to find the required reference.

See structure:

modeltree.png

 

See also example code:

 

 

BEGIN_ASM_DESCR 
	SEARCH_MDL_REF THIS_283 CSYS CS0 CSYS_FOUND
	SEARCH_SUBCOMP_REF ASSEMBLY SKELETON CSYS CS0 CSYS_TO_ALIGN
	CONFIG_ELEM
	
	ASSEMBLE THIS
		CSYS CSYS_TO_ALIGN CSYS_FOUND
	END_ASSEMBLE
END_ASM_DESCR 

 

 

PFA also a litte demo component that you can use (Created in Creo 7).

 

I hope this is what you were looking for.

 

Greetings Sam

 

Samuel Brantner
B&W Software GmbH

This is was I'm looking for! Thank you, Samuel!

Top Tags