几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » SolidWorks二次开发
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-04-13, 01:38 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】procedure lasercutting

procedure lasercutting
what i'm trying to make is the following:
i'll be trying to make a macro i can run in my main assembly which automatically makes all the dxf files and cost calculating parameters i need to order my laser cutting work.

the procedure this macro has to run through is this:
1. fff"> recognize if the part is a sheet metal . if yes: continue to 2, else : don't do anything
2. fff"> make an empty( no sheet format) drawing with scale 1:1
3. fff"> layer 0: flat pattern van het part in sheetscale
4. fff"> layer 1: maximale x en y maat
5. fff"> layer 2: note met :
1) filename
2)material en thickness
3)quantity of this part in this assembly
4)max x and y dimension
5)number of perforations
6)total perimeter of this
6. fff"> export to excel file:
1) create new line
2)output: filename,material,thickness,max x dimension,max y dimension,number of perforations,total perimeter
7. fff"> save drawing as dxf ( same name as the part file name)
8. fff"> the end
figuur 1 example of the wanted dxf

i've been searching through this forum for a while and found some usefull stuff to start with. i'll post the links later on today.

all i hope is that i can convince some people to help me with this task, as i'm only learning to program in solidwork.

i also think this macro could be extremely usefull all people who have to make lasercutting stuff. so i won't be the only person who benefits from making this.

hope to have a lot of responses and help in this topic.
edited: 06/13/2007 at 10:48 am by steven vandermeulen
click for full image
the macro is almost ready
i'll post it when it's ready
hi steven,i am new to the forum, and actually the reason i joined the forum was to hopefully find information on this exact subject.did you ever finish this macro? if so i would really like to get a copy of it or even what you have so far. i have been attempting to do the same thing, and have gathered different bits of code. so if you wanted to send some stuffto me, maybe i can contributethanksdenten
here are the files for the calculation of the laserwork.copy all
the files in a folder.draw your sheetmetal part and save it. after
you saved it, unsuppress the flat pattern and put the 2 main
dimensions on it. they will be called rd1@annotions and
rd2@annotations.then run macro "laserwerk macro 1" and
enter the quantity in the message boxsave the part.make al the
other parts.when all the parts are finished, put them all in a
folder "c:/laserwerk"make sure nothing is open in
solidworks and run the macro "macro laserwerk 2 inox,
staal(steel) or galva".you'll see that solidworks creates al
the proper files ( dxf for the laser, tiff to print all the sheets
easely from windows explorer)i hope someone could look at these
macro's and try to make them lighter and better i'm open for
suggestions.here's the
hi steven
do you know that you can attach files to your post? when you reply at the bottom of the window there is an attach file(s) button. press it, a new window will open, click on the choose button, browse to your file, press ok then click on the upload file button (at the right of the window), once it is finish select your file in the list and click the attach file button (at the bottom of the window). that's all.
hope this help
################################
stef
designer / cad administrator
sw 2007 sp5 winxp pro sp2
i know, but my explorer fucked things up.
your yousendit link has expired. could you please repost the file.
thanks
link is updated:
thanks for that.
i've attached the file to this reply.
here is the final lasercutting macro.
the big change is that he doesn't open all files before creating the drawings and you don't have to put in the dimensions manually anymore
it uses the minimal bounding box macro
hi everyone,
this sounds like a great macro i can not get it to work could someone give me a good explanation of what is suppose to be open or what all has to be done before the macro is run? thanks in advance!!
solidworks 2006,2007,2008,2009 (office premium.)
core 2 duo e6850 @ 3.00 mhz
window xp pro sp3 32 bit
ati firegl v7350
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭



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


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多