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

yang686526 2009-04-12 07:28 PM

【转帖】retrieve dimension selection name
 
retrieve dimension selection name
this has been an ongoing difficulty, and i have gotten close on a few tries, but only one solution which is not preferred at all.
the problem :
initial conditions:
display dimension object retrieved from a view.
final condition:
have display dimension name used when selecting an object in solidworks (i.e. the design table name)
conditions:
do not use selection methods. assume selection is not possible.
complications:
origin component of dimension could exist more than once in an assembly which is contained in the root view. this means the unique component name is necessary.
so far the most i can get is a full list of the selection names for the displayed dimensions in the view. this is achieved with view.getdimensionids4(). i was happy with this, but i was not able to get a correlation to the display dimension i found.
i hope someone has found a way to do this.
and yes, i do need to do it this way. the problem has come up many times, and if i could found an algorithm for this, it would make my programs so much easier.
thanks for your help
-anthony
i am conviced anything can be done in solidworks api.
solidworks 7.0 sp2.2
vb.net
quick


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