明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1750|回复: 1

[基础] [求助]How to compile vlx file

[复制链接]
发表于 2010-4-28 13:38 | 显示全部楼层 |阅读模式
Dear Sir,
How to compile vlx file see attached my original file & convert file
please help me in detail
My original file
  1. ; Automatic save linked to shortened ZOOM options
  2. (defun c:Zw () (Command "zoom" "w")(ausv))
  3. (defun c:ZP () (command "zoom" "p"))
  4. (defun c:Zs () (command "zoom" "p"))
  5. (defun c:Zx () (command "zoom" "p"))
  6. (defun c:ze () (command "zoom" "e"))
  7. (defun c:za () (command "zoom" "a")(ausv))
  8. (defun c:zd () (command "zoom" "d"))
  9. (DEFUN C:Z1 () (COMMAND "ZOOM" ".1X" ""))
  10. (DEFUN C:Zz () (COMMAND "ZOOM" ".8X" ""))
  11. (defun c:zm () (command "zoom" "vmax"))
  12. ;----------------- END OF ZOOM SECTION --------
  13. ;----------------- START OF OFFSET COMMAND SECTION ------
  14. (DEFUN C:O () (COMMAND "OFFSET") (princ))
  15. (defun c:OO () (command "offset" "150") (princ))
  16. (defun c:000 () (command "offset" "125"))
  17. (defun c:00 () (command "offset" "100"))
  18. (defun c:OOO () (command "offset" "230"))
  19. (defun c:150 () (command "offset" "150"))
  20. (defun c:230 () (command "offset" "230"))
  21. (defun c:100 () (command "offset" "100"))
  22. (DEFUN C:O2 () (COMMAND "OFFSET" 250))
  23. (DEFUN C:06 () (COMMAND "OFFSET" 6))
  24. (DEFUN C:09 () (COMMAND "OFFSET" 9))
  25. ;----------------- END OF OFFSET SECTION --------
  26. (DEFUN C:RM ()
  27.   (SETQ LU (GETVAR "LUNITS"))
  28.   (IF (> LU 2)
  29.     (LOAD "c:/LISP/ROOMSZFT")
  30.     (LOAD "c:/LISP/ROOMSZMM")
  31.   )
  32.   (ROMASDTC)
  33.   (C:RM)
  34. )
  35. (defun C:CONV ()
  36.   (setq what (getstring "\nInch to mm or mm to inch [m/i] "))
  37.   (if (= what "m")
  38.     (progn
  39.       (setq ft (getreal "\nHow many Feet ? "))
  40.       (setq in (getreal "\nHow many inch ? "))
  41.       (setq mm (* 25.4 (+ (* 12.0 ft) in)))
  42.       (prompt "\nIn mm this is ")
  43.       (princ mm)
  44.       (princ)
  45.     )
  46.   )
  47.   (if (= what "i")
  48.     (progn
  49.       (setq mm (getreal "\nmm. Value = "))
  50.       (setq inch (/ mm 25.4))
  51.       (setq ft (/ inch 12.0))
  52.       (setq ft1 (fix ft))
  53.       (setq inc (* (- ft ft1) 12.0))
  54.       (prompt "\n Value in ft-inch is : ")
  55.       (print)
  56.       (princ ft1)
  57.       (princ " feet ")
  58.       (princ (rtos inc))
  59.       (princ " inches")
  60.       (princ)
  61.     )
  62.   )
  63. )
  64. ;---------------------
  65. (defun c:r9 (/ ent po1)
  66.   (setvar "cmdecho" 0)
  67.   (prompt "\nFor rotate @ 90..")
  68.   (setq ent (SSGET))
  69.   (setq po1 (getpoint "\nPick base point.."))
  70.   (command "rotate" ent "" po1 "90")
  71.   (setvar "cmdecho" 1))
  72. ;------------------------------------------------------------
Convert file
  1. ;---------------------------------------
  2. (defun main
  3. FasStringtables 0
  4. FasStringtables 1
  5. (defun main
  6. nil
  7. (setq C:ZW <Func> C:ZW)
  8. (vl-ACAD-defun C:ZW)
  9. C:ZW
  10. (setq C:ZP <Func> C:ZP)
  11. (vl-ACAD-defun C:ZP)
  12. C:ZP
  13. (setq C:ZS <Func> C:ZS)
  14. (vl-ACAD-defun C:ZS)
  15. C:ZS
  16. (setq C:ZX <Func> C:ZX)
  17. (vl-ACAD-defun C:ZX)
  18. C:ZX
  19. (setq C:ZE <Func> C:ZE)
  20. (vl-ACAD-defun C:ZE)
  21. C:ZE
  22. (setq C:ZA <Func> C:ZA)
  23. (vl-ACAD-defun C:ZA)
  24. C:ZA
  25. (setq C:ZD <Func> C:ZD)
  26. (vl-ACAD-defun C:ZD)
  27. C:ZD
  28. (setq C:Z1 <Func> C:Z1)
  29. (vl-ACAD-defun C:Z1)
  30. C:Z1
  31. (setq C:ZZ <Func> C:ZZ)
  32. (vl-ACAD-defun C:ZZ)
  33. C:ZZ
  34. (setq C:ZM <Func> C:ZM)
  35. (vl-ACAD-defun C:ZM)
  36. C:ZM
  37. (setq C:O <Func> C:O)
  38. (vl-ACAD-defun C:O)
  39. C:O
  40. (setq C:OO <Func> C:OO)
  41. (vl-ACAD-defun C:OO)
  42. C:OO
  43. (setq C:000 <Func> C:000)
  44. (vl-ACAD-defun C:000)
  45. C:000
  46. (setq C:00 <Func> C:00)
  47. (vl-ACAD-defun C:00)
  48. C:00
  49. (setq C:OOO <Func> C:OOO)
  50. (vl-ACAD-defun C:OOO)
  51. C:OOO
  52. (setq C:150 <Func> C:150)
  53. (vl-ACAD-defun C:150)
  54. C:150
  55. (setq C:230 <Func> C:230)
  56. (vl-ACAD-defun C:230)
  57. C:230
  58. (setq C:100 <Func> C:100)
  59. (vl-ACAD-defun C:100)
  60. C:100
  61. (setq C:O2 <Func> C:O2)
  62. (vl-ACAD-defun C:O2)
  63. C:O2
  64. (setq C:06 <Func> C:06)
  65. (vl-ACAD-defun C:06)
  66. C:06
  67. (setq C:09 <Func> C:09)
  68. (vl-ACAD-defun C:09)
  69. C:09
  70. (setq C:RM <Func> C:RM)
  71. (vl-ACAD-defun C:RM)
  72. C:RM
  73. (setq C:CONV <Func> C:CONV)
  74. (vl-ACAD-defun C:CONV)
  75. C:CONV
  76. (setq C:R9 <Func> C:R9)
  77. (vl-ACAD-defun C:R9)
  78. (defun C:ZW
  79. (ads-cmd "zoom")
  80. (ads-cmd "w")
  81. (defun C:ZP
  82. (ads-cmd "zoom")
  83. (defun C:ZS
  84. (ads-cmd "zoom")
  85. (defun C:ZX
  86. (ads-cmd "zoom")
  87. (defun C:ZE
  88. (ads-cmd "zoom")
  89. (defun C:ZA
  90. (ads-cmd "zoom")
  91. (ads-cmd "a")
  92. (defun C:ZD
  93. (ads-cmd "zoom")
  94. (defun C:Z1
  95. (ads-cmd "ZOOM")
  96. (ads-cmd ".1X")
  97. (defun C:ZZ
  98. (ads-cmd "ZOOM")
  99. (ads-cmd ".8X")
  100. (defun C:ZM
  101. (ads-cmd "zoom")
  102. (defun C:O
  103. (ads-cmd "OFFSET")
  104. (defun C:OO
  105. (ads-cmd "offset")
  106. (ads-cmd "150")
  107. (defun C:000
  108. (ads-cmd "offset")
  109. (defun C:00
  110. (ads-cmd "offset")
  111. (defun C:OOO
  112. (ads-cmd "offset")
  113. (defun C:150
  114. (ads-cmd "offset")
  115. (defun C:230
  116. (ads-cmd "offset")
  117. (defun C:100
  118. (ads-cmd "offset")
  119. (defun C:O2
  120. (ads-cmd "OFFSET")
  121. (defun C:06
  122. (ads-cmd "OFFSET")
  123. (defun C:09
  124. (ads-cmd "OFFSET")
  125. (defun C:RM
  126. (setq LU (GETVAR "LUNITS"))
  127. (LOAD "c:/LISP/ROOMSZFT")
  128. Then OR Else
  129. (ROMASDTC )
  130. (defun C:CONV
  131. (setq WHAT (GETSTRING "\nInch to mm or mm to inch [m/i] "))
  132. (setq FT (GETREAL "\nHow many Feet ? "))
  133. (setq IN (GETREAL "\nHow many inch ? "))
  134. (setq MM (* 25.4 (+ (* 12.0 FT) IN)))
  135. (PROMPT "\nIn mm this is ")
  136. (PRINC MM)
  137. (PRINC )
  138. (setq MM (GETREAL "\nmm. Value = "))
  139. (setq INCH (/ MM 25.4))
  140. (setq FT (/ INCH 12.0))
  141. (setq FT1 (FIX FT))
  142. (setq INC (* (- FT FT1) 12.0))
  143. (PROMPT "\n Value in ft-inch is : ")
  144. (PRINT )
  145. (PRINC FT1)
  146. (PRINC " feet ")
  147. (PRINC (RTOS INC))
  148. (PRINC " inches")
  149. (defun C:R9
  150. (_al-bind-alist '(ENT PO1))
  151. (SETVAR "cmdecho" 0)
  152. (PROMPT "\nFor rotate @ 90..")
  153. (setq ENT (SSGET ))
  154. (setq PO1 (GETPOINT "\nPick base point.."))
  155. (ads-cmd "rotate")
  156. (ads-cmd ENT)
  157. (ads-cmd "")
  158. (ads-cmd PO1)
  159. (ads-cmd "90")





"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2010-4-28 13:51 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-3 01:00 , Processed in 0.202311 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表