iLogic concept <<
Previous Next >> Final
application
參考Solidworks 零件繪圖練習1.pdf, 繪製Lesson1

到DartPad編譯, 使用大一上"計算機程式"課程所教 "for 迴圈"

純Dart程式
int s = 1;
int i;
int start = 1;
int end = 64;
int sum;
int L = 80;
int W = 30;
int H = 40;
int d3 = 0;
int d12 = 10;
main() {
sum = 0;
for (i = start; i <= end; i++) {
L = L + 5;
W = W + 5;
H = H + 5;
s = s + 1;
d3 = d3 + 0;
d12 = d12 + 5;
print("If Style = $s Then \n Leight = $L");
print("Width = $W \n Height = $H");
print("d3 = $d3 \n d12 = $d12");
print(
"volume = iProperties.Volume \n Volume = volume \n Parameter.UpdateAfterChange = True");
print("End If");
}
return 0;
}
將結果複製出, 放入iLogic規則中

iLogic程式
If Style = 2 Then
Leight = 85
Width = 35
Height = 45
d3 = 0
d12 = 15
volume = iProperties.Volume
Volume = volume
Parameter.UpdateAfterChange = True
End If
即可使用表單編輯


iLogic concept <<
Previous Next >> Final