SCR文件脚本的制定
2 posters
AutoCAD顧問 :: 技術(發言等級:一般會員) :: :: 2D討論
第1頁(共1頁)
SCR文件脚本的制定
大量图纸,配置转换到模型,我自己写了一个脚本,但是无法执行,哪里有问题了呢?
OPEN D:\1\タンク001.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク001_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク002.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク002_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク003.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク003_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク004.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク004_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク005.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク005_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク006.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク006_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク007.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク007_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク008.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク008_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク009.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク009_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク010.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク010_Rev1.dwg FILEDIA 1 QSAVE CLOSE
请指教。
OPEN D:\1\タンク001.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク001_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク002.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク002_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク003.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク003_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク004.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク004_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク005.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク005_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク006.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク006_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク007.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク007_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク008.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク008_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク009.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク009_Rev1.dwg FILEDIA 1 QSAVE CLOSE
OPEN D:\1\タンク010.dwg FILEDIA 0 EXPORTLAYOUT D:\1\タンク010_Rev1.dwg FILEDIA 1 QSAVE CLOSE
请指教。
aromild- 一般會員
- 文章總數 : 43
年齡 : 52
來自 : 日本
職業 : 設計
愛好 : CAD
個性 : GOOD
使用年資 : 10
使用版本 : 2020
經驗值 : 2044
威望值 : 6
注冊日期 : 2020-01-09
網路上找到的
會自動產生一個 lxa.scr 參考一下
model
layout set
Layout1
exportlayout
"D:\Autocad_VBA\Layouts\Layout1"
layout set
Layout2
exportlayout
"D:\Autocad_VBA\Layouts\Layout2"
model
Autolisp 程式原碼
;;; export all Layouts
(prompt "\n Written by: Amir Hossein Sattarian ")
(prompt "(+98)9126049289 ahsattarian2@gmail.com ")
(prompt "\n Type : LXA ")
(defun c:lxa ()
(setq layouts (layoutlist))
(setq layouts (acad_strlsort layouts))
(setq ad (getvar "dwgprefix"))
(setq layfol (strcat ad "Layouts"))
(vl-mkdir layfol)
(setq f (strcat layfol "\\lxa.scr"))
(setq ff (open f "w"))
(write-line "model" ff)
(foreach layout layouts
(write-line "layout set" ff)
(write-line layout ff)
(setq adname (strcat (chr 34) layfol "\\" layout (chr 34)))
(write-line "exportlayout" ff)
(write-line adname ff)
)
(write-line "model" ff)
(close ff)
(command "script" f)
)
model
layout set
Layout1
exportlayout
"D:\Autocad_VBA\Layouts\Layout1"
layout set
Layout2
exportlayout
"D:\Autocad_VBA\Layouts\Layout2"
model
Autolisp 程式原碼
;;; export all Layouts
(prompt "\n Written by: Amir Hossein Sattarian ")
(prompt "(+98)9126049289 ahsattarian2@gmail.com ")
(prompt "\n Type : LXA ")
(defun c:lxa ()
(setq layouts (layoutlist))
(setq layouts (acad_strlsort layouts))
(setq ad (getvar "dwgprefix"))
(setq layfol (strcat ad "Layouts"))
(vl-mkdir layfol)
(setq f (strcat layfol "\\lxa.scr"))
(setq ff (open f "w"))
(write-line "model" ff)
(foreach layout layouts
(write-line "layout set" ff)
(write-line layout ff)
(setq adname (strcat (chr 34) layfol "\\" layout (chr 34)))
(write-line "exportlayout" ff)
(write-line adname ff)
)
(write-line "model" ff)
(close ff)
(command "script" f)
)
- 附件
shackle_2005- 初級會員
- 文章總數 : 232
年齡 : 53
來自 : 台中
職業 : 程式設計
愛好 : 音樂
個性 : 隨和
使用年資 : 10 年
使用版本 : 2013
積分 : 3
經驗值 : 6758
威望值 : 361
注冊日期 : 2010-09-20
AutoCAD顧問 :: 技術(發言等級:一般會員) :: :: 2D討論
第1頁(共1頁)
這個論壇的權限:
您 無法 在這個版面回復文章