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

yang686526 2009-04-13 03:09 PM

【转帖】using api to export parasolid
 
using api to export parasolid
i am trying to write a macro that will take the current solid part i am working with export it to a file with a new name based on the original name, a custom revision field, and a custom description. i have the code able to compile the filename and path as i want but cannot get it to export the file. the statement i am using is from the help example:
bret = swpart.saveas4(spathname, _
swsaveascurrentversion, _
swsaveasoptions_silent, _
nerrors, _
nwarnings)
the pathname i am entering is, for example:
c:\rd-1020 rev x4 housing-transmission.x_t
when i run the file it does nothing. if i change the extension to .sldprt or .tif then it will save the file. i am using sw 2004 sp 2.1 and no i cannot upgrade. the documentation states that if you put the extension in this command should automatically do the conversion to the extension, but when i put in either .x_t or .igs nothing happens. can someone help me figure this out.


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