我将整理一篇博客文章,其中我使用的脚本部分将文件名输入PDF。
这一部分应该放在脚本顶部附近。它只保存dwg文件名。这是奇怪的,但脚本可以处理这些行,如果lisp刚刚好。。。
- (setq CurrDwgName (getvar "dwgname"))
- (setq Fname (substr CurrDwgName 1 (- (strlen CurrDwgName) 4)))
- (setq name (strcat (getvar "DWGPREFIX") Fname ".pdf"))
然后,在稍后的脚本中,当要求您命名文件时,将其馈送
!名称(如下所示)
- ;Enter file name <C:\Work\some drawing.pdf>:
- !name
更新:这里有一个链接,指向我在早期博客文章中发布的脚本:https://docs.google.com/file/d/0B_y9I236zHwOYm00NllzbVRsQ2s/edit?usp=sharing
或者更好的是,我将在这里发布脚本:(只要确保如果您从下面复制,那么在最后一个命令的最底部有一个额外的输入)
~格雷格
- (setq CurrDwgName (getvar "dwgname"))
- (setq Fname (substr CurrDwgName 1 (- (strlen CurrDwgName) 4)))
- (setq name (strcat (getvar "DWGPREFIX") Fname ".pdf"))
- ;Command:
- FILEDIA
- ;Enter new value for FILEDIA <1>:
- 0
- ;Command:
- -PLOT
- ;Detailed plot configuration? [Yes/No] <No>:
- Yes
- ;Enter a layout name or [?] <Model>:
- Layout1
- ;Enter an output device name or [?] <None>:
- DWG To PDF.pc3
- ;Enter paper size or [?] <ANSI A (11.00 x 8.50 Inches)>:
- ANSI full bleed B (11.00 x 17.00 Inches)
- ;Enter paper units [inches/Millimeters] <Inches>:
- Inches
- ;Enter drawing orientation [Portrait/Landscape] <Portrait>:
- Landscape
- ;Plot upside down? [Yes/No] <No>:
- No
- ;Enter plot area [Display/Extents/Layout/View/Window] <Display>:
- Extents
- ;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <Fit>:
- 1:1
- ;Enter plot offset (x,y) or [Center] <0.00,0.00>:
- C
- ;Plot with plot styles? [Yes/No] <Yes>:
- Yes
- ;Enter plot style table name or [?] (enter . for none) <>:
- monochrome.ctb
- ;Plot with lineweights? [Yes/No] <Yes>:
- Yes
- ;Plot Scale lineweights with plot scale? <No>
- ;Plot paper space first? <No>
- ;Hide paper space objects? <No>
- ;Enter file name <C:\Work\solids-Model.pdf>:
- !name
- ;Save changes to page setup? Or set shade plot quality? [Yes/No/Quality] <N>:
- No
- ;Proceed with plot [Yes/No] <Y>:
- Yes
- ;Command:
- FILEDIA
- ;;;Enter new value for FILEDIA <1>:
- 1
|