Parameter as Feature in PKT

Eric Burhop

Parameter as Feature in PKT

I am trying to instantiate a PowerCopy within a PKT.

There are parameters as inputs in the PC, but I cannot figure out how to get the PKT to pass the parameters as a feature. Here is my script:

Let i (Integer)
Let F (Feature)
Let G (Feature)
Let H (Feature)
Set G = `FLANGE LENGTH`  
Set H = `DRAFT`  


i = 1

For i while i <= `List.1` ->Size()
{
    
    Set F = InstantiateTemplate("FLANGE"  , `PKT_STUDY_200124`      )
    
    F-> SetAttributeObject("INPUT CURVE", `List.1`  ->GetItem(i))
    
    F->SetAttributeObject("DIE LINE", `Geometrical Set.1\DIE LINE`   )
    
    F->SetAttributeObject("FLANGE LENGTH", G      )
    
    F->SetAttributeObject("DRAFT", H )
    
    EndModifyTemplate(F)
    
}

 

Please help!

Thanks!

Cliff Johnson, Cliff

RE: Parameter as Feature in PKT
(in response to Eric Burhop)


F->SetAttributeReal("FLANGE LENGTH",G)

F->SetAttributeReal("DRAFT",H)

 

 

How to ask questions 

Edited By:
Cliff Johnson, Cliff[Toyota Motor Engineering & Manufacturing North America, Inc.] @ Jan 24, 2020 - 12:23 PM (America/Eastern)

Eric Burhop

RE: Parameter as Feature in PKT
(in response to Cliff Johnson, Cliff)

Thanks Cliff, but I believe that would try to pass the Real value into the PowerCopy.

Unfortunately, that does not work.

I have the same issue when placing the parameter itself into the SetAttributeObject.

I need to pass the parameter feature into the attribute object.

 

Thanks again.

Cliff Johnson, Cliff

RE: Parameter as Feature in PKT
(in response to Eric Burhop)

Oh, you made the parameter an Input to the power copy. I thought you were referring to a published parameter. 

Yeah I don't know how to do that.   

There is the pointer object  http://www.coe.org/p/fo/et/thread=21433

This may be the way. but I have never been able to make it work. The documentation on Pointer is very minimal and has no useful example. 

 

 

How to ask questions