几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】addin in vb.ne (http://www.dimcax.com/hust/showthread.php?t=5040)

yang686526 2009-04-13 08:45 AM

【转帖】addin in vb.ne
 
addin in vb.net
for those who write addin in vb.net
do you turn "option strict" on or off?
if it's on, then
swapp = ctype(createobject("sldworks.application"), sldworks.sldworks)
instead of:
createobject("sldworks.application")
thx, chris
solidworks 2007 (office pro.) sp5.0
testing solidworks 2009 (pro) sp0.0
dell precision t3400
2 cpu (8500) 3.16 ghz, 3.25 gb of ram
window xp pro sp2
nvidia fx 570 6.14.11.6262
option strict just prevents automatic explicit casting of objects. by default c# and other languages have to cast objects to the correct type, the exception is vb. if you turn the option on vb does not do it automatically so you have to cast it to the correct type.


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