几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】what is the error activex cant create the objec (http://www.dimcax.com/hust/showthread.php?t=5893)

yang686526 2009-04-13 03:24 PM

【转帖】what is the error activex cant create the objec
 
what is the error: activex can't create the object.
i am using the swdocumentmgr 2007 type library.
my license key is apisupport assigned.
when run the following code , the error can see.
dim swdocmgr as swdocumentmgr.swdmapplication
dim swdoc as swdocumentmgr.swdmdocument
dim classfac as swdocumentmgr.swdmclassfactory
set classfac = createobject("swdocumentmgr.swdmclassfactory")
set swdocmgr = classfac.getapplication("license key") 'specify your license key
set swdoc = swdocmgr.getdocument("e:\1.sldprt", swdmdocumentpart, true, swdmdocumentopenerrornone)
debug.print "param string:" & swdoc.getcustomproperty("name", swdmcustominfotext)
swdoc.closedoc
set swdoc = nothing
set swdocmgr = nothing
set classfac = nothing
end sub
set swdocmgr = classfac.getapplication("license key") 'specify your license key
error: activex can't create the object.
what about it ?
license key is wrong ?
edited: 09/15/2008 at 11:03 pm by sha zhehua
license key is wrong thats pretty much the only problem. or dm isn't installed on the system, or you have not put the zlib or implode dll files into the same folder as your program/macro (although i don't think it would error out at this stage because of that)
dm is installed on my system . the zlib and implode dll files in the same folder(c:\program files\common files\solidworks shared).
then i'd say its the license key. triple check it


所有的时间均为北京时间。 现在的时间是 06:12 PM.