Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set Kfactor iLogic

3 REPLIES 3
Reply
Message 1 of 4
johnster100
1166 Views, 3 Replies

Set Kfactor iLogic

Hi Guys,

Is there an easy way to set Kfactor is sheet metal parts using iLogic or API. There's a command get Kfactor but nothing there to set it.

 

thanks,

John

Tags (3)
3 REPLIES 3
Message 2 of 4

Take a look in the API Help Files, there are the following properties:

 

FlatBendResult.kFactor Property

 

UnfoldMethod.kFactor Property

 

I hope it helps,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 4
204Е10
in reply to: johnster100

Hi,

I have the same question I have created the ilogi lines shown below, but are unfinish any help?:

 

Sub oKFactor()
doc = ThisDoc.Document
Dim aOa As String
oSDef = doc.ComponentDefinition
For Each oEachMethod In oSDef.UnfoldMethods
If oEachMethod.UnfoldMethodType = UnfoldMethodTypeEnum.kLinearUnfoldMethod Then

Select Case iProperties.Value("Project", "Material")
Case "ALUMINIUM"
oEachMethod.kFactor = "0.50"
Case "MILD/ST"
oEachMethod.kFactor = "0.44"
Case "ST/ST (304L)"
oEachMethod.kFactor = "0.36"
Case Else
End Select
End If
Next

kFactor = SheetMetal.ActiveKFactor

MessageBox.Show(kFactor , "K Factor")
End Sub

Message 4 of 4
YuhanZhang
in reply to: 204Е10

The iLogic rule should work, I just tested it here if I  set the document material to one of that in your Select Case, it does update the kFactor's value.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report