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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! 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?

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
tbraxton
22-Sapphire I
(To:YaroslavSin)

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!

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags