• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

create rectangles in autocad inserting the size in excel

  • Thread starter Thread starter marcuccio HF
  • Start date Start date

marcuccio HF

Guest
Good morning to all
I submit to those who know + me the following problem:
in the attached excel tabellina are reported the dims of rectangles, I would like to create a dwg file for each rectangle just taking advantage of the data inserted in the table. I certainly can, but I don't know how to do it.
I return to your knowledge, thank you in advance and greet you
 

Attachments

  • tab rect autocad.webp
    tab rect autocad.webp
    25.8 KB · Views: 70
Good morning to all
I submit to those who know + me the following problem:
in the attached excel tabellina are reported the dims of rectangles, I would like to create a dwg file for each rectangle just taking advantage of the data inserted in the table. I certainly can, but I don't know how to do it.
I return to your knowledge, thank you in advance and greet you
version of used autocad, rectangle insertion point (baricentric on 0.0.0 or with low edge sx on 0.0.0)

Will the cells always be a and b?
 
version of used autocad, rectangle insertion point (baricentric on 0.0.0 or with low edge sx on 0.0.0)

Will the cells always be a and b?
autocad 2011
coordinated speech: I have no constraints of the series "where you want"
The cells will always be those.
Thank you.
 
autocad 2011
coordinated speech: I have no constraints of the series "where you want"
The cells will always be those.
Thank you.
I train you something done in super speed by fishing "what and the" pieces of code I had done for anything else, so it is not optimized or perhaps the best solution. . cmq ask for an example and this does its duty.

decomprimi the zip file, you will find a dvb file that is the autocad macro, the xls file is what I used for example, but you will need to use your own.

from the tool menu autocad->macro->load project (_vbaload) select the dvb file I sent you.

then always from tools->macro->macro (alt+f8) and launch the macro "rectangles"... the macro will ask you to select the coordinates file.... and should do what you asked.

a rectangle for files.

to see the list of tools->macro->editor of visualbasic...(alt+f11)

Good job!
 

Attachments

I wanted to thank you for the availability, efficiency and resolve.
vba works perfectly. Don't send me to that country! if you wonder if it was possible to save each single file (or rectangle) with a name, maybe a third column in the table, where the name of the pos is reported.
It is right to explain the type of my work: metal carpentry design.
I insert templates (dwg format) into cam software (lantek) and I execute the lamyerization operation. operations as daily bread.
so your help was valuable.
greetings
 
I wanted to thank you for the availability, efficiency and resolve.
vba works perfectly. Don't send me to that country! if you wonder if it was possible to save each single file (or rectangle) with a name, maybe a third column in the table, where the name of the pos is reported.
It is right to explain the type of my work: metal carpentry design.
I insert templates (dwg format) into cam software (lantek) and I execute the lamyerization operation. operations as daily bread.
so your help was valuable.
greetings
bhè that to save is objectively an indisputable need, I don't know how much regga autocad opening all files even if they are just rectangles... for me the third column goes well for the file name, oopure if you want by file name you can also put a progressive and size, example 1-300x400 tell me you.

We save and close files or just save them?

cmq pure I use a 2011 64bit... on a xp 64 very woody ehhh!
 
I realize that saving 50-60 files is enough... but what do you say if we were "tire" a little + ns wks?
I would opt for the classic salva&chiudi and let go of the progr.
to adapt to my needs can I insert a "real" excel file in the vba file that you have promptly prepared?
I'm testing 7 final 64 bits, though, as I wrote in the subfurm "hardware" we're always on autocad, you know better than me like is not adegauze to double processor machines
Thanks again
 
I realize that saving 50-60 files is enough... but what do you say if we were "tire" a little + ns wks?
I would opt for the classic salva&chiudi and let go of the progr.
to adapt to my needs can I insert a "real" excel file in the vba file that you have promptly prepared?
I'm testing 7 final 64 bits, though, as I wrote in the subfurm "hardware" we're always on autocad, you know better than me like is not adegauze to double processor machines
Thanks again
I'm sorry, but I don't know if the name is on the 3 column or is it okay bxh?

I'll put the mix on you so you want to see how strong you can do it... and let them work with processors... and then he always has 3 cores resting.. I'm buzzing!
 
not having had answer and I will proceed with my work... I did so:

there are 2 files...
  1. rectangles_2_columns - manages files by giving name n-bxh
  2. rectangles_3_columns manages files by giving name of the content of the 3^ column
 

Attachments

in reference to the discussion "create rectangles in autocad inserting the size in excel", I find myself in a similar situation and so I kindly ask for help:

- I need to draw rectangles (pieces) - taking the data from an excel table.
- I don't need to create a single file for each piece, but have the pieces on the same file
- the positioning of rectangles is not important (I imagine that having to indicate coordinates it would be better to space the individual pieces on a board with a fixed size? )
- if it is possible to enter, always obtaining the data from the excel table, assign to each rectangle a name/code

Can anyone help me?
 
in reference to the discussion "create rectangles in autocad inserting the size in excel", I find myself in a similar situation and so I kindly ask for help:

- I need to draw rectangles (pieces) - taking the data from an excel table.
- I don't need to create a single file for each piece, but have the pieces on the same file
- the positioning of rectangles is not important (I imagine that having to indicate coordinates it would be better to space the individual pieces on a board with a fixed size? )
- if it is possible to enter, always obtaining the data from the excel table, assign to each rectangle a name/code

Can anyone help me?
what my has proposed shape is an excellent solution, follow the instructions and you will see that it comes to the solution.
greetings
 
I followed the instructions, but autocad 2012 tells me the following errors that I attach in jpg formatErrore di compilazione2.webpErrore di compilazione.webp
 
does not find the bookcase "autocad 2011 type library", if you go on tools/references remove the check on the bookcase marked with "manca" and selections "autocad 2012 type library". same speech for other versions.
 
I followed the instructions, but autocad 2012 tells me the following errors that I attach in jpg formatView attachment 35234View attachment 35235
does not find the bookcase "autocad 2011 type library", if you go on tools/references remove the check on the bookcase marked with "manca" and selections "autocad 2012 type library". same speech for other versions.
quoting as always the good rpor66

by autocad tools->macro->editor of visual basic (alt+f11) then select tools->references->autocad 2012 type library

should be enough.
 
quoting as always the good rpor66

by autocad tools->macro->editor of visual basic (alt+f11) then select tools->references->autocad 2012 type library

should be enough.
Thank you very much for your help!

ok but until the selection of the file with error message: could not load excel
 
solved the previous problem (the computer in use had fluffy calc, and not excel - on another computer worked perfectly).

the problems remain for me others:

- I need to have all the rectangles in the same file and no longer have files.
- I would need to have the indication (e.g. code assigned in a third column) of the rectangle in text format near the drawn rectangle (inside or outside, no matter)


this because I would later need to explode the polylines created for a subsequent rescue in dxf format.
If you could help me, I'd be grateful!
 
Help!!
solved the previous problem (the computer in use had fluffy calc, and not excel - on another computer worked perfectly).

the problems remain for me others:

- I need to have all the rectangles in the same file and no longer have files.
- I would need to have the indication (e.g. code assigned in a third column) of the rectangle in text format near the drawn rectangle (inside or outside, no matter)


this because I would later need to explode the polylines created for a subsequent rescue in dxf format.
If you could help me, I'd be grateful!
 
Sorry I'm late but I'm taken this time as soon as I find a cut-out the macro according to your needs.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top