|
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 |
|