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

yang686526 2009-04-13 01:55 PM

【转帖】reorder sketch in the api
 
reorder sketch in the api
i have some models that are sheetmetal we are beginning to look at automating with a vb program.
we are modifying existing models and i'm creating a layout sketch at the top of the tree to drive all the feature dimensions. problem is the base flange's absorbed sketch is really the first feature in the tree if viewed from the parent/child relationships.
i need the new layout sketches to be first but there doesn't seem to be a way to reorder the sketch position (base flange sketch) in the tree if the sketch is absorbed in a base flange feature.
is this possible through the api?
jason capriotti
jason.capriotti@thyssenkrupp.com
solidworks 2009 sp3.0
winxp 32 & 64bit
ok, i managed to hack a recorded macro to reorder sketches. i've attached it for anyone needing to do this. it's rough and has no error handling. basically it prompts you to type in the sketch name you want reorder, then type in the feature to reorder after.
anyone, it works for those absorbed sketches that can't be reordered by dragging.
jason capriotti
jason.capriotti@thyssenkrupp.com
solidworks 2009 sp3.0
winxp 32 & 64bit
quick


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