Skip to main content
17-Peridot
December 16, 2019
Solved

Adding a flexible part to an assembly_OTK Java

  • December 16, 2019
  • 1 reply
  • 3494 views

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!

Best answer by YaroslavSin

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

1 reply

VladiSlav17-PeridotAuthor
17-Peridot
December 20, 2019

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?

17-Peridot
December 23, 2019

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

VladiSlav17-PeridotAuthor
17-Peridot
December 23, 2019

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

Снимок.PNG

Regards!