当前位置: 代码迷 >> vbScript >> 怎么使用java调用vbscript文件,并传入参数
  详细解决方案

怎么使用java调用vbscript文件,并传入参数

热度:630   发布时间:2012-10-28 09:54:44.0
如何使用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



  相关解决方案