`
lcl19880917
  • 浏览: 2948 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

如何使用java调用vbscript文件,并传入参数

阅读更多
下面是vbscript脚本

Dim obj
Set obj= CreateObject("DWGTOPDFX.ConvertPDF")
obj.AddExcudeLayer "Defpoints" 'OffLayers

obj.Width  = 250 'uint is mm
obj.Height = 150 'uint is mm
obj.ColorMode = 0 '1--white&black, 0--256 color mode
obj.InputFile = "Office.dwg"

obj.PenWidth(7) = 0.2 'set line width, unit in mm, color index (0) is black, (1) is red...etc
'obj.nBackgroundColor = 0 'default background color is white, 0-black 1-red...
'obj.PSPath = "c:\winnt\system32\ps" 'set postscript support files path. Please copy the PS files to the right location and add it here.
'obj.AddFontPath("C:\\Xref\\") 'Add font support path
'obj.AddFontPath "E:\Program Files\AutoCAD 2007\Fonts" 'Add font support path

MsgBox "Begin converting..."
obj.Convert "Office.pdf"
MsgBox "Conversion complete"
If Err.Number < 0 Then
MsgBox Err.Description
End If



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics