几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】vb.net Problem With For Each (http://www.dimcax.com/hust/showthread.php?t=18969)

yang686526 2009-05-07 06:11 PM

【转帖】vb.net Problem With For Each
 
vb.net problem with 'for each'
vb.net problem with 'for each'
private sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.click
listbox1.items.clear()
for n = 0 to pdb.blocks.count - 1
blockobj = pdb.blocks.item(n)
listbox1.items.add(blockobj.name)
for each entobj in blockobj
listbox1.items.add(entobj.objectname)
next entobj
next n
end sub
i have the above routine in vb.net. i find that i am unable to repeat this routine, unless the drawing is reloaded first.
the bocks list correctly, but on the second use the entities in each block are not found.
the multiple use of this routine works correctly in vb6.
any ideas please?

hi clive,
it is looks like i have fixed this problem. sorry but this fix does not included to 1.06 version. i think you can ask neil for update.


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