home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 November / Dppcpro1198.iso / Nov / Intelcad / Uncompressed / API / Scripts / Lines.scr < prev    next >
Encoding:
Text File  |  1998-03-18  |  4.0 KB  |  503 lines

  1. ;---------------------------------------------
  2. ;File name: Lines.SCR
  3. ;Purpose: Demonstrate Lines and options 
  4. ;
  5. ;Last Modified: 3/18/98
  6. ;---------------------------------------------
  7. CMDECHO
  8. 0
  9. PICKBOX
  10. 3
  11. APERTURE
  12. 10
  13. ;
  14. ; Erase anything that's there already.
  15. erase
  16. all
  17.  
  18. ; Turn blips off
  19. blipmode
  20. off
  21. ; Set the current layer to zero.
  22. layer
  23. s
  24. 0
  25.  
  26. color
  27. bylayer
  28. ; Setting all the other necessary system variables:
  29. vpoint
  30. 0,0,1
  31. ; Zoom to a window at least 100 x 100 (if it were square).
  32. zoom
  33. c
  34. 75,50
  35. 120
  36. elev
  37. 0
  38. 0
  39. gridmode
  40. 0
  41. fillmode
  42. 1
  43. snapmode
  44. 0
  45. linetype
  46. s
  47. bylayer
  48.  
  49. ; Draw a red grid for reference
  50. layer
  51. m
  52. redlines
  53. c
  54. red
  55.  
  56.  
  57. line
  58. 0,0
  59. 0,100
  60. 150,100
  61. 150,0
  62. 0,0
  63.  
  64. line
  65. 0,50
  66. 150,50
  67.  
  68. line
  69. 50,0
  70. 50,100
  71.  
  72. line
  73. 100,0
  74. 100,100
  75.  
  76. layer
  77. s
  78. 0
  79.  
  80. ;1st rectangle we're drawing a house using the line
  81. ;command by picking points
  82. layer
  83. m
  84. yellowlines
  85. c
  86. yellow
  87.  
  88.  
  89. text
  90. 1,50
  91. 2.5
  92.  
  93. Lines by picking pts.
  94.  
  95. 1,54
  96. 1.5
  97.  
  98. (*Change vpoint to see 2nd church)
  99. line
  100. 10,60
  101. 10,80
  102. 40,80
  103. 40,60
  104. 10,60
  105.  
  106. line
  107. 10,80
  108. 25,90
  109. 40,80
  110.  
  111. line
  112. 20,60
  113. 20,70
  114. 30,70
  115. 30,60
  116.  
  117. line
  118. 25,60
  119. 25,70
  120.  
  121. line
  122. 25,90
  123. 25,98
  124.  
  125. line
  126. 23,95
  127. 27,95
  128.  
  129. line
  130. 10,60,5
  131. 10,80,5
  132. 40,80,5
  133. 40,60,5
  134. 10,60,5
  135.  
  136. line
  137. 10,80,5
  138. 25,90,5
  139. 40,80,5
  140.  
  141. line
  142. 20,60,5
  143. 20,70,5
  144. 30,70,5
  145. 30,60,5
  146.  
  147. line
  148. 25,60,5
  149. 25,70,5
  150.  
  151. line
  152. 25,90,5
  153. 25,98,5
  154.  
  155. line
  156. 23,95,5
  157. 27,95,5
  158.  
  159. ;2nd rectangle is using the line command with "Angle
  160. ;and Length"
  161. layer
  162. m
  163. greenlines
  164. c
  165. green
  166.  
  167.  
  168. text
  169. 51,50
  170. 2.5
  171.  
  172. Lines using "@ and <"
  173. line
  174. 75,60
  175. @10<0
  176.  
  177. line
  178. 75,60
  179. @12<20
  180.  
  181. line
  182. 75,60
  183. @14<40
  184.  
  185. line
  186. 75,60
  187. @16<60
  188.  
  189. line
  190. 75,60
  191. @18<75
  192.  
  193. line
  194. 75,60
  195. @20<90
  196.  
  197. line
  198. 75,60
  199. @18<105
  200.  
  201. line
  202. 75,60
  203. @16<120
  204.  
  205. line
  206. 75,60
  207. @14<140
  208.  
  209. line
  210. 75,60
  211. @12<160
  212.  
  213. line
  214. 75,60
  215. @10<180
  216.  
  217. ; Again, with negatives
  218. line
  219. 75,60,-5
  220. @10<0
  221.  
  222. line
  223. 75,60,-5
  224. @12<20
  225.  
  226. line
  227. 75,60,-5
  228. @14<40
  229.  
  230. line
  231. 75,60,-5
  232. @16<60
  233.  
  234. line
  235. 75,60,-5
  236. @18<75
  237.  
  238. line
  239. 75,60,-5
  240. @20<90
  241.  
  242. line
  243. 75,60,-5
  244. @18<105
  245.  
  246. line
  247. 75,60,-5
  248. @16<120
  249.  
  250. line
  251. 75,60,-5
  252. @14<140
  253.  
  254. line
  255. 75,60,-5
  256. @12<160
  257.  
  258. line
  259. 75,60,-5
  260. @10<180
  261.  
  262. ; Again, with positives
  263. line
  264. 75,60,5
  265. @10<0
  266.  
  267. line
  268. 75,60,5
  269. @12<20
  270.  
  271. line
  272. 75,60,5
  273. @14<40
  274.  
  275. line
  276. 75,60,5
  277. @16<60
  278.  
  279. line
  280. 75,60,5
  281. @18<75
  282.  
  283. line
  284. 75,60,5
  285. @20<90
  286.  
  287. line
  288. 75,60,5
  289. @18<105
  290.  
  291. line
  292. 75,60,5
  293. @16<120
  294.  
  295. line
  296. 75,60,5
  297. @14<140
  298.  
  299. line
  300. 75,60,5
  301. @12<160
  302.  
  303. line
  304. 75,60,5
  305. @10<180
  306.  
  307. text
  308. 103,50
  309. 3
  310. 0
  311. 3D Lines
  312. line
  313. 103,95
  314. 127,88,5
  315. 113,73,10
  316. 135,68,0
  317.  
  318. ; Again, with negatives
  319. line
  320. 103,95
  321. 127,88,-5
  322. 113,73,-10
  323. 135,68,0
  324.  
  325. ; Here we snap to the lines
  326. text
  327. 7,1
  328. 3
  329. 0
  330. Snapping to Lines
  331. line
  332. 9,41
  333. 39,12
  334.  
  335. color
  336. blue
  337. line
  338. end
  339. 12,38
  340. 29,41
  341.  
  342. text
  343. 21,41
  344. 1.5
  345. 0
  346. end
  347. line
  348. mid
  349. 28,23
  350. 46,26.5
  351.  
  352. text
  353. 37,27
  354. 1.5
  355. 0
  356. mid
  357. line
  358. nea
  359. 32,20
  360. 18,19
  361.  
  362. text
  363. 20,19
  364. 1.5
  365. 0
  366. near
  367. line
  368. 10,29
  369. perp
  370. 19,32
  371.  
  372. text
  373. 11,30
  374. 1.5
  375. 17,36
  376. perp
  377. ; Again with negatives
  378. color
  379. yellow
  380. line
  381. 19,41,-5
  382. 49,12,-5
  383.  
  384. color
  385. blue
  386. line
  387. end
  388. 22,38
  389. 39,41,-5
  390.  
  391. text
  392. 31,41,-5
  393. 1.5
  394. 0
  395. end
  396. line
  397. mid
  398. 38,23
  399. 56,26.5,-5
  400.  
  401. text
  402. 47,27,-5
  403. 1.5
  404. 0
  405. mid
  406. line
  407. nea
  408. 42,20
  409. 28,19,-5
  410.  
  411. text
  412. 30,19,-5
  413. 1.5
  414. 0
  415. near
  416. line
  417. 20,29,-5
  418. perp
  419. 29,32
  420.  
  421. text
  422. 21,30,-5
  423. 1.5
  424. 27,36
  425. perp
  426. ; Draw lines using Enter to connect to last point
  427. color
  428. magenta
  429. elevation
  430. 3
  431. text
  432. 55,1
  433. 3
  434. 0
  435. Enter for last pt
  436. line
  437. 57,39
  438. 88,39
  439.  
  440. line
  441.  
  442. 57,26,3
  443.  
  444. line
  445.  
  446. 89,22,-5
  447.  
  448. elevation
  449. 0
  450. ;6th rectangle uses line with a thickness
  451. layer
  452. s
  453. yellowlines
  454.  
  455. color
  456. bylayer
  457. text
  458. 101,0
  459. 2.5
  460. 0
  461. Lines with Thickness
  462.  
  463. 101,48
  464. 1.5
  465.  
  466. Change vpoint to see thickness
  467. thickness
  468. 5
  469. line
  470. 105,10,5
  471. 120,10,0
  472. 130,30
  473. 115,40,-5
  474. 105,10,5
  475.  
  476. line
  477. 105,10,10
  478. 120,10,10
  479. 130,30,10
  480. 115,40,10
  481. 105,10,10
  482.  
  483. line
  484. 105,10,-10
  485. 120,10,-10
  486. 130,30,-10
  487. 115,40,-10
  488. 105,10,-10
  489.  
  490. ;----------------------------------------------------------------------
  491. ;Now for the grand finale
  492. color
  493. cyan
  494. text
  495. 126,10,0
  496. 3
  497.  
  498. Done!
  499. ;----------------------------------------------------------------------
  500. vpoint
  501. 1,-1,1
  502. ;----------------------------------------------------------------------
  503.