几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   PC-DMIS (http://www.dimcax.com/hust/forumdisplay.php?f=52)
-   -   【转帖】getsetarrayindexvalue.txt (http://www.dimcax.com/hust/showthread.php?t=2804)

huangyhg 2009-04-06 07:30 PM

【转帖】getsetarrayindexvalue.txt
 
get/setarrayindexvalue
hi,
have an array in a cdmis artrogram
assign/v1 = array(1,2.4,"+z",5)
i want to read and change this variable from within visual basic
'all objects reviously dim'd and linked
set cdvar = dmisart.getvariablevalue("v1")
result = cdvar.getarrayuerbound
'result will say 4, doing this just to make sure the variable
'is an array and available anyway
set cdi2 = cdvar.getarrayindexvalue(2)
cdi2.stringvalue = "-x"
cdvar.setarrayindexvalue 2, cdi2 <-'at this oint i get an error message "server error"
'and cdvar.getarrayuerbound will show 0
dmisart.setvariablevalue "v1", cdvar ' never got here u to now
' this should imort the changed array into the c-dmis artrogram
does anyone have an idea, i really areciate any comment because i'm really stuck here.
thanks


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