oCompDef = ThisDoc.Document.ComponentDefinition
kFac = oCompDef.UnfoldMethod.kFactor
iProperties.Value("Custom", "kFac") = kFac
This writes the k-factor value through to a custom iProperty called "kFac."
For those new to iLogic, to use this rule code you will first need to display the iLogic browser inside Inventor by clicking the "iLogic Browser" button on the "iLogic" panel of the "Manage" tab. It should appear on the left of the screen below your model browser.
|Display iLogic Rule Browser|
Click the "Rules" tab and right-click in the panel and select "Add Rule." Give the new rule a name. The rules editor will open and you can simply copy-paste the above code into the code window and click "Ok." The rule will fire immediately and create a new custom iproperty and populate it with the k-Factor value.
|Custom iProperty created and populated by rule|