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

yang686526 2009-04-13 02:02 PM

【转帖】save as macro in drawing
 
save as macro in drawing
i have a drawing template with predefined view. unlike opening a part in a drawing, when i open this template, it doesn't recognise its name when i save.
if i creat a new drawing from a part without predefined view and when i try to save, the part name is picked and i don't have to retype the name.
however if i creat a new drawing from a part with predefined view in a template and when i try to save, the part name is not picked and i have to retype the name.
so i want to make a macro that will pick up the name of a part that is in the drawing and save the name with .drw
anyone know this please?
if you have predefined views, you should start a new drawing from the model, and not open a blank drawing first.
matt lorono
solidworks 2007 sp3.1
cad engineer/ecn analyst
originally posted by: matthew lorono
if you have predefined views, you should start a new drawing from the model, and not open a blank drawing first.
i do start a new drawing from the model.
once i make a model, i then create a drawing by hitting 'make drawing from part' icon on the toolbar which brings my drawing template. then i select an apporpriate drawing with predefined views.
however it still doesn't pick up the name when i save...
does this step familiar to you and act differently?
i have checked it both the ways and in both the cases i.e starting a new drawing and inserting model or creating a drawing directly from the model, the file name on save doesn't reflect the model name. though i'm not a vb expert, i'm trying to create some macro for it. in the mean time you can contact your var.
deepak gupta
sw2007 sp5.0
sw2009 sp2.1
which version are you using. this may be a bug.
matt lorono
solidworks 2007 sp3.1
cad engineer/ecn analyst
i'm using sw2008 sp0.0.
deepak gupta
sw2007 sp5.0
sw2009 sp2.1


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