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

yang686526 2009-04-13 08:52 AM

【转帖】another traversal question - getactiveconfigurationname
 
another traversal question - getactiveconfigurationname
well, here is my latest hangup. i am again traversing an assembly. while traversing, i would like to pull the "in use" configuration name. i don't care about the name of the configuration that was active when the document was closed. i care about what it is now. i have multiple parts in my assembly called "float". "float" has 2 configurations, 3" and 6". i am only able to pull the configuration name that was active when the document was closed. do i need to open the part and then grab the configuration name? how do you guys deal with this?
here is how i am pulling the info:
(swapp.getactiveconfigurationname(swchildcomp.getpathname))
again, any help is appreciated.
thanks in advance!
tony szuta
cswa, cswp, cswp-smtl
configname = swchildcomp.referencedconfiguration should return the name of of the configuration that that instance of the component is in.
wayne matus
texas engineering systems
answer swchildcomp.referencedconfiguration did the trick.
thanks wayne.
tony szuta
cswa, cswp, cswp-smtl
intel core2 quad (q6600 @ 2.40 ghz)
nvidia quadro fx 4600 sdi
solidworks 2008 sp 4.0 (x32 & x64)
solidworks 2009 sp 2.0 (x32 & x64)
quick


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