|
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. |
|