查看单个帖子
旧 2009-04-13, 03:24 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)