马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- (setq #layout (vla-get-activelayout #doc))
- (setq PrinterConfigPath (Vlax-Get (Vlax-Get (Vlax-Get (Vlax-Get-Acad-Object) 'Preferences) 'Files) 'PrinterConfigPath))
-
- (defun c:plotdiy/Form2#OnInitialize (/ DeviceNames StyleTableNames)
- (dcl-Control-SetList plotdiy/Form2/ComboBox1 (setq DeviceNames (vlax-safearray->list (vlax-variant-value (vla-GetPlotDeviceNames #layout)))))
- (dcl-Control-SetList plotdiy/Form2/ComboBox2 (setq StyleTableNames (vlax-safearray->list (vlax-variant-value (vla-GetPlotStyleTableNames #layout)))))
- (if (member "ToPDF DIY.pc3" DeviceNames)
- (dcl-Control-SetText plotdiy/Form2/ComboBox1 "ToPDF DIY.pc3")
- (dcl-Control-SetText plotdiy/Form2/ComboBox1 "DWG To PDF.pc3")
- )
- (if (member "白图黑框.ctb" StyleTableNames)
- (dcl-Control-SetText plotdiy/Form2/ComboBox2 "白图黑框.ctb")
- (dcl-Control-SetText plotdiy/Form2/ComboBox2 "monochrome.ctb")
- )
- (dcl-Control-SetText plotdiy/Form2/TextBox7
- (strcat
- (vla-item (vlax-get (vlax-create-object "WScript.Shell" ) 'SpecialFolders) "Desktop")
- "\\批量导PDF"
- )
- )
- )
- (defun c:plotdiy/Form2/TextButton1#OnClicked (/)
- (startapp "explorer"
- (strcat
- PrinterConfigPath
- "\"
- (dcl-Control-getText plotdiy/Form2/ComboBox1 "ToPDF DIY.pc3")
- )
- )
- )
- (defun c:plotdiy/Form2/TextButton2#OnClicked (/)
- (startapp "explorer"
- (strcat
- PrinterConfigPath
- "\\Plot Styles\"
- (dcl-Control-getText plotdiy/Form2/ComboBox2 "ToPDF DIY.pc3")
- )
- )
- )
- (defun c:plotdiy/Form2/TextButton3#OnClicked (/ fd)
- (if (setq fd (GetFolder "选择批量打印文件夹" 12))
- (dcl-Control-SetText plotdiy/Form2/TextBox7 fd)
- )
- )
- (defun c:plotdiy/Form2/TextButton4#OnClicked (/)
- (dcl-Form-Close plotdiy/Form2 1)
- )
- (defun c:plotdiy/Form2/TextButton5#OnClicked (/)
- (dcl-Form-Close plotdiy/Form2 3)
- )
- (defun c:plotdiy/Form2/TextButton6#OnClicked (/)
- (dcl-Form-Close plotdiy/Form2 4)
- )
- (defun c:plotdiy/Form2/OptionButton1#OnClicked (Value /)
- (dcl-Control-SetValue plotdiy/Form2/OptionButton2 0)
- )
- (defun c:plotdiy/Form2/OptionButton2#OnClicked (Value /)
- (dcl-Control-SetValue plotdiy/Form2/OptionButton1 0)
- )
- (defun c:plotdiy/Form2/OptionButton3#OnClicked (Value /)
- (dcl-Control-SetValue plotdiy/Form2/OptionButton4 0)
- )
- (defun c:plotdiy/Form2/OptionButton4#OnClicked (Value /)
- (dcl-Control-SetValue plotdiy/Form2/OptionButton3 0)
- )
- (Load_ODCL_Project "plotdiy" T nil nil)
- (setq Result (dcl-Form-Show plotdiy/Form2))
- (princ)
- (princ (itoa Result))
|