几何尺寸与公差论坛

 找回密码
 注册
查看: 605|回复: 0

【转帖】procedure lasercutting

[复制链接]
发表于 2009-4-13 13:38:42 | 显示全部楼层 |阅读模式
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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 05:25 , Processed in 0.036220 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表