Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show only
|
Search instead for
Did you mean:
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.Translate
hi there i have a bit of a long winded question. i have to get the total area of the drawing with holes and the number of entities of a drawing, all the drawings are simple 2D drawings. Is there a way of doing this with a lisp or is there another autocad package that i can use. the reason why i need this is for a costing file for laser cutting.
Interesting, my main occupation is programming lasers for cutting sheet metal.
Here's some code I wrote a while back.
Regards,
Mel
;;; examines polylines and circles
;;; polylines not closed are ignored and turned red
;;; part perimeter is highlighted
;;;
;;; calculates number of internal features and part area
;;; with feature area subtracted
Whoops, I apparently forgot to account for parts with no holes.
Regards,
Mel
;;; examines polylines and circles
;;; polylines not closed are ignored and turned red
;;; part perimeter is highlighted
;;;
;;; calculates number of internal features and part
;;; area with feature area subtracted
what I am trying to do is get the cut length and the number of pierce's for the part. have a program that does this but want to do this in autocad and if i can use a lisp to do this will make my life alot easier.
{code} wrote in message news:6105983@discussion.autodesk.com...
Howzit Mel what I am trying to do is get the cut length and the number of pierce's for the part. have a program that does this but
want to do this in autocad and if i can use a lisp to do this will make my life alot easier. thanks to all for the help
I made a few changes.
I assume you are ultimately going to calculate an estimated run time?
It would be trivial to add prompts for feed rate and pierce time and do the math.
am trying to get the information so that we can do cost calculations.....the material and cutting times for the machines have already been put onto an excel spread sheet. wanting to use auto cad for everything, and not multiple programs.
Thanks for all the help..... I used the lisp from Mel and it worked perfectly, but have one more question for you. is it posiblre to get the square size of the part, e.g the x and y sizes. for the pricing of the laser cut part i need to know what the material use is. I have looked in autocad to see if i can get the square size but have had no luck.
Sure, the data could be appended to a .csv file to be opened later in Excel.
What format would you like the data in?
I would think you would also want to associate the drawing name with each line of data?
The info that needs to go as a csv file needs to be the word cutlength one rcolumn and the actual value in the next column, this needs to be for each of those values that is genarated in the pop up window. the "x" and "y" value need to be seperated so that each value is in a column. is there a way of getting the image into the same file so that when i open excel i can see both the info and the image.
I made some changes, the data is written (appended) to a .csv file.
I added many configuration options, they are listed at the top of the routine.
Let me know if you have any questions regarding them, or any other aspect of the code.
As for the image, I'm not aware of a way to place an image along with the data, if that's what you mean.
;;; data labels
;;; only modify the label
;;; do not modify the "v" value
;;; do not modify the list order
;;;
(setq labels-list
'((v1 . "Drawing Name")
(v2 . "Cut length")
(v3 . "Pierces")
(v4 . "Bounding Box X")
(v5 . "Bounding Box Y")
(v6 . "Bounding Box Area")
(v7 . "Actual Area")
)
)
;;; data to write to file
;;; based on above list from top down
;;; write data to file = 0
;;; omit data from file = 1
;;;
(setq data-write-list
'(0 0 0 0 0 0 0)
)
;;; order data is to be written
;;; based on labels-list
;;;
(setq data-order-list
'(v1 v2 v3 v4 v5 v6 v7)
)
Like RobinHutch I'm new to this thing. I'm after something very similar to what he wanted.
However, I'm only interested in the area of the objects, but I need to have both Sq m and Sq ft.
(I only need it as a pop up window, as it is only for checking visually).
The lisp works wel, is there a way of saving the .csv file as the drawing name. so that each drawing has its own .csv file.dont worry bout the drawing will export it as a .wmf file and use it that way