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

Adding a flexible part to an assembly_OTK Java

SOLVED
Highlighted
Pearl

Adding a flexible part to an assembly_OTK Java

Hello to all!
Please tell me how to add a part to an assembly using OTK Java and make this part flexible.
I watched the otkAssemblyItemOperationsExample example, but it does not work.

Because the assembly is done according to a predefined structure:

/* ---------------------------------------------------
    * ASSEMBLY STRUCTURE USED FOR THE EXAMPLE *
---------------------------------------------------
							---------		-------
							 FEAT ID 		 FEAT #
							---------		-------
FLEX_TOP_ASM.asm
|
|---ASM_RIGHT						    1  	 		   1
|---ASM_TOP						    3			   2
|---ASM_FRONT						    5			   3
|---ASM_DEF_CSYS					    7			   4
|
|===FLEX_PART2.prt					   39			   5
|
|===FLEX_SUB_ASM1.asm					   42			   6
	|
	|---ASM_RIGHT				    	    1			   1
	|---ASM_TOP					    3			   2
	|---ASM_FRONT					    5			   3
	|---ASM_DEF_CSYS				    7			   4
	|
	|===FLEX_PART1.prt				   39			   5
	|
	|===FLEX_SUB_ASM2.asm				   40			   6
		|
		|---ASM_RIGHT				    1			   1
		|---ASM_TOP				    3			   2
		|---ASM_FRONT				    5			   3
		|---ASM_DEF_CSYS			    7			   4
		|
		|===FLEX_PART1.prt			   39			   5
		|===FLEX_PART2.prt			   40			   5
			
---------------------------------------------------
    * ASSEMBLY STRUCTURE USED FOR THE EXAMPLE *
--------------------------------------------------- */

But I don’t know where to get the incoming parts and assemblies (FLEX_TOP_ASM.asm, FLEX_PART2.prt, and so on).
Yours faithfully!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Adding a flexible part to an assembly_OTK Java

Starting from Creo Parametric 3.0 M180 and Creo Parametric 4.0 M060

New functions introduced:

wfcFeature.WFeature.ListVariedItems

wfcFeature.WFeature.ListVariedParameters

 

I think, need to make this steps:

  1. get flexible component
  2. using this component (feature) get an array of all items (dimensions, features...)
  3. find needed dimension from array
  4. set new value for this dimension as usual

View solution in original post

9 REPLIES 9

Re: Adding a flexible part to an assembly_OTK Java

Hello everybody!
I created a flexible item.
can you please tell me how to manage the flexible parameter now?
What methods are needed for this?

Re: Adding a flexible part to an assembly_OTK Java

See chapter in User's Guide "Variant Items for Flexible Components"

Re: Adding a flexible part to an assembly_OTK Java

Hello!
I watched
But I couldn’t do what I wanted to do.

Снимок.PNG

Regards!

Re: Adding a flexible part to an assembly_OTK Java

Can you provide more info about what you want to do with flexible items?

Re: Adding a flexible part to an assembly_OTK Java

Oh sure.
I add the part (conditionally cube) to the assembly.
I make this part flexible (one of its dimensions becomes changeable in the assembly).
I did all this programmatically.
Now I need to access this flexible size and resize it. This also needs to be done programmatically.
Respectfully!

Re: Adding a flexible part to an assembly_OTK Java

I think, you can found what you want in ...\Common Files\otk\otk_java\otk_java_examples\otkAssemblyItemUtils.java

Re: Adding a flexible part to an assembly_OTK Java

I looked at this file.
It describes how to create flexible elements, but not how to manage them, as I understand it.

Re: Adding a flexible part to an assembly_OTK Java

Starting from Creo Parametric 3.0 M180 and Creo Parametric 4.0 M060

New functions introduced:

wfcFeature.WFeature.ListVariedItems

wfcFeature.WFeature.ListVariedParameters

 

I think, need to make this steps:

  1. get flexible component
  2. using this component (feature) get an array of all items (dimensions, features...)
  3. find needed dimension from array
  4. set new value for this dimension as usual

View solution in original post

Re: Adding a flexible part to an assembly_OTK Java

Thanks a lot!!!

Respectfully!

Announcements