马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
c : this macro takes a standardized note, lets the user input specific variable
c : values, and then puts this note on the drawing where the user specifies.
c :
c : In this example the user is specifying minimum letter height to be on a part,
c : maximum inside radii, and maximum outside radii.
c :
c : This assumes all note settings are as desired and you want to create a
c : note in your current workview.
c :
c : The array line will contain the lines of the note.
c : The array templine will contain the second half of lines where a variable
c : is to be inserted.
c :
# string lin(15)
# string templn(3)
c :
# lin(1) = "NOTES:"
# lin(2) = " "
# lin(3) = " 1. DOD-STD-100, ASTM E380 AND ANSI Y14.5M-82 APPLY"
# lin(4) = " "
# lin(5) = " 2. MARK PART NO. AND REV. LEVEL BY INK STAMP IN"
# lin(6) = " APPROXIMATE AREA SHOWN USING "
c :
# templn(1) = " MIN. HIGH LETTERS"
c :
# lin(7) = " "
# lin(8) = " 3. DIMENSIONS IN ( ) ARE IN U.S. CUSTOMARY UNITS"
# lin(9) = " "
# lin(10) = " 4. ALL DIMENSIONS APPLY AFTER SURFACE TREATMENT"
# lin(11) = " "
# lin(12) = " 5. UNLESS OTHERWISE SPECIFIED:"
# lin(13) = " a) ALL INSIDE RADII TO BE "
c :
# templn(2) = " MAX"
c :
# lin(14) = " b) ALL OUTSIDE RADII TO BE "
c :
# templn(3) = " MAX"
c :
# lin(15) = " c) NO BURRS OR SHARP CORNERS PERMITTED"
c :
c :
c : Interactively prompt the user for the minimum letter height to be on a part.
c : Repeat this until a value is entered.
c : A value has been entered if the status is not equal to negative one.
c : Interactively prompt the user for max inside radii,repeat until entered.
c : Interactively prompt the user for max outside radii,repeat until entered.
c :
# status = 0
# repeat
# erase prompt
# show prompt ("What is the minimum height of letters?")
# get number (minheight,status)
# until (status NE -1)
c :
# status = 0
# repeat
# erase prompt
# show prompt ("What is the maximum inside radii value?")
# get number (maxinrad,status)
# until (status NE -1)
c :
# status = 0
# repeat
# erase prompt
# show prompt ("What is the maximum outside radii value?")
# get number (maxoutrad,status)
# until (status NE -1)
c :
c : Form the lines the need variable input.
c :
# minheightstr=valtostr("%.2f",minheight)
# maxinradstr=valtostr("%.2f",maxinrad)
# maxoutradstr=valtostr("%.2f",maxoutrad)
c :
# lin(6) = lin(6) + minheightstr + templn(1)
# lin(13) = lin(13) + maxinradstr + templn(2)
# lin(14) = lin(14) + maxoutradstr + templn(3)
c :
c : Interactively prompt the user to enter a digitize point
c :
# status=3
# repeat
# erase prompt
# show prompt ("Digitize where you would like the note to appear:")
# get digitize (xdig,ydig,status)
# until (status EQ 0)
# inquire view number (viewcurrent)
# digpoint = "L: " + viewcurrent + " " + xdig + " " + ydig
c :
# read system variable ("note_downspace",notedownspace)
# read system variable ("note_height",noteheight)
c:
# spacing=0
# for i=1 to 15 do
# create text(xdig,ydig - (i*spacing),lin(i))
# spacing=notedownspace * noteheight
# next
E : END
在i-deas中的错误:
Error, line 96: invalid procedure call; check syntax and arguments.
就是create text()那一行!!!!!!!!
哪位大侠帮俺们一下啊! |