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

draw a polyline from excel values

  • Thread starter Thread starter xsky998
  • Start date Start date

xsky998

Guest
Hey, guys.
is the first time I place in the forum and hope not to make mistakes! :smile:
I should write a code that allows me to draw a closed polyline from values in a table of a excel sheet (as if I drew a radar chart in excel). Below is the table with random values:

degrees (°) meters
0 300
90 600
180
270 200

Can you tell me how to do this? It's a bit complicated. I hope you've got me.

Thank you so much!! !
 
Hey, guys.
is the first time I place in the forum and hope not to make mistakes! :smile:
I should write a code that allows me to draw a closed polyline from values in a table of a excel sheet (as if I drew a radar chart in excel). Below is the table with random values:

degrees (°) meters
0 300
90 600
180
270 200

Can you tell me how to do this? It's a bit complicated. I hope you've got me.

Thank you so much!! !
the most trivial thing you can do is to use a sheet of excel where you chain values, then select ctrl+c drive, type the pl command
and then ctrl+v and here is your polyline.

if your values are always 0°90°180°270° is fairly trivial the thing, 0° y vale snepre 0 to 90° x=0 and so.

you know that the y+ axis is by default 90 ° so you will have to manipulate the coordinates that you can insert so coordinated on the 300 axis<90 ass
 
But if I wanted to make this quicker? in the click of a button on excel and creates a dwg file with the created polyline, is it possible to do something like that?

Thank you.
 
But if I wanted to make this quicker? in the click of a button on excel and creates a dwg file with the created polyline, is it possible to do something like that?

Thank you.
you can... but it takes time to make it.. and I now unfortunately can not really.... and then you must always put on the balance the time you use to develop and what you save then in use.....

if you want after the holidays we can deepen
 
perhaps the easiest thing would be to create a vba routine that saves a .scr file (script) of autocad to read then from an empty file of autocad.
in this way you should only open autocad, open a blank file and read the .scr file extension created by vba in excel.
 
Unfortunately I work a lot with these things, and to realize a macro that I directly care about autocad would make me very easy the valiant!
Unfortunately for me it is Arabic all this! :smile:

How could you accomplish this routine?

Thank you.
 
I'm leaving in half an hour, so she's leaving in two weeks. .
However what placed you shape seems great to me, if you have to do one polyline, concatenating the cells you get the necessary command.
then do ctrl+c and ctrl+v in autocad does not seem so honorable.

otherwise you have to better explain what your needs are: how many polylines you have to do, if in polar coordinates (step 90° or any angle), with how many points, etc.
to think about how to structure a sheet for your needs
I often use scripts to create polylines from dot files. But normally I do them manually, using excel and a text file.

a macro in excel can be done without problems, provided that the scope in which it has to operate is well framed.
wave
 
good holidays then!! Thank you for your help!
in the meantime I can do as it recommended shape... .
 
I'm leaving in half an hour, so she's leaving in two weeks. .
However what placed you shape seems great to me, if you have to do one polyline, concatenating the cells you get the necessary command.
then do ctrl+c and ctrl+v in autocad does not seem so honorable.

otherwise you have to better explain what your needs are: how many polylines you have to do, if in polar coordinates (step 90° or any angle), with how many points, etc.
to think about how to structure a sheet for your needs
I often use scripts to create polylines from dot files. But normally I do them manually, using excel and a text file.

a macro in excel can be done without problems, provided that the scope in which it has to operate is well framed.
wave
hi wave, I'm new to the forum. I was looking on the internet for a way to do what you say in the above answer. I refer to creating polylines (or lines maybe) on autocad starting from coordinate data on excel. I have found various programs that do this but I would like to create a manual and personal to use in work. I ask you therefore politely if you can explain (obviously within the limits of time that requires this explanation!) how to generate these script files that autocad must read to automatically draw the linear/poliline entities (even possibly also texts) that I specify on the original file excel. thanks in advance
 
post the coordinates file with explanations of how you would like to join points and see what I can do.

Hi.

wave
 
post the coordinates file with explanations of how you would like to join points and see what I can do.

Hi.

wave
hello wave and thanks for availability. what I want to do is to automate as much as possible the design of the executives of the beam armor in c.a. I practically already found what I need (the excel file that you find attached), only I would need more "diagrams" (as it calls them in the attached file, where the limit is set to 5). I tried to "frugare" a little the vba of the attached macro but without result seen my incompetence. I ask you therefore politely if you can edit this file or create a new one on the same as this, perhaps with the possibility to add even written, layer (or quotas that would be the maximum). for any other clarification remain at your disposal. Thank you.
 

Attachments

hello wave and thanks for availability. what I want to do is to automate as much as possible the design of the executives of the beam armor in c.a. I practically already found what I need (the excel file that you find attached), only I would need more "diagrams" (as it calls them in the attached file, where the limit is set to 5). I tried to "frugare" a little the vba of the attached macro but without result seen my incompetence. I ask you therefore politely if you can edit this file or create a new one on the same as this, perhaps with the possibility to add even written, layer (or quotas that would be the maximum). for any other clarification remain at your disposal. Thank you.
I can't run the application, it's probably a problem with my 64bit libraries... cmq look at the code what is created is not a design, but a code dxf that then atuocad translates... then go to add quotas,texts etc and sure as possible but definitely laborious... the fact of being able to add other diaphragms instead is decidedly less expensive... cmq seen that wave took the ball.... Let's see how he works and then see.
 
I can't run the application, it's probably a problem with my 64bit libraries... cmq look at the code what is created is not a design, but a code dxf that then atuocad translates... then go to add quotas,texts etc and sure as possible but definitely laborious... the fact of being able to add other diaphragms instead is decidedly less expensive... cmq seen that wave took the ball.... Let's see how he works and then see.
I get it! Thanks the same. However there is a macro inside the file, activate it with a normal button, which once clicked opens autocad and generates the dxf. for quotas and texts I imagined it was difficult. We have nothing but wave: so!! Hi.
 
However there is a macro inside the file, activate it with a normal button, which once clicked opens autocad and generates the dxf.
:4404:

:hahahah: joke from... in the previous post I wrote that I found the macro and read the code inside.... (the one in the button :finger:). .

and the macro first generates the dxf file (which at the end is a text file) and then opens it with autocad (shellexecute 0, vbnullstring, nprofile, vbnullstring, "", 1)

then to edit or add qlc you have to do so by inserting the dxf code on the objects to be added within the file.
 
:4404:

:hahahah: joke from... in the previous post I wrote that I found the macro and read the code inside.... (the one in the button :finger:). .

and the macro first generates the dxf file (which at the end is a text file) and then opens it with autocad (shellexecute 0, vbnullstring, nprofile, vbnullstring, "", 1)

then to edit or add qlc you have to do so by inserting the dxf code on the objects to be added within the file.
Sorry then, I had misunderstood your words!:finger: soon and thanks again
 
I am not a dxf expert to add quotas you need to know how acad writes a quota in dxf and then change the vba. Sincerely it takes a little time and it is not precisely the direction in which I would like to use mine.

I added as required a column to the previous file, the thing is trivial and if they can add as many as they want.

inside the vba I added three rows in the select case, I commented them so they are easily identifiable.

If you want to add the seventh column inside the excel sheet, you need to copy and paste the three reference columns.

then it is necessary to define the following variables:

n_7 indicating the number of points that would be found in ac11
c_7 in aa14
tab_7 defined within the variable definition form and equal to: =carto(c_7;0;n_7;3)

you need to change the cell u8 and also add the presence of the new column.

Incidentally, I normally prefer to write to the vba, rather than a dxf a autocad script, which later is more easily editable. It is also easier to enter complex commands. question of tastes!

wave
 

Attachments

I quote wave considerations on this project.

a small note for both... this is a solution made and adapted to the requirements erot79, but what done is ethically incorrect, the code as it is evident has not been written by erotic since he did not know where to put hands on it, and therefore came from the network or from files that were passed.

even if the author did not put (I have been deleted) the program header with the license type, it is good to ask him before "ravanare" in the code written by others. is not a legal or illegal matter but of ethics.. :finger:
 
sincerely I do not accept the fact, a file placed on the net without any kind of protection or explicit reference not to change it is free. as such can be changed and put back on the net.
within the file proposed by erot79 there are no protections or references.
If the protections were removed from erot79, it should be done to him and not to me. I had it without protection and I don't feel like I've read anyone.
greetings

wave
 
Don't take it too personally. . .

was a general note to tell users who put their hands on the work of others to remember that it is others.. all here.....

then everyone is free to do what he wants... we would miss!!!
 
Don't take it too personally. . .

was a general note to tell users who put their hands on the work of others to remember that it is others.. all here.....

then everyone is free to do what he wants... we would miss!!!
First of all I thank wave for the availability and service rendered to me. on the "copyright" speech I wouldn't do so long, since the file comes from the network (http://strutturisti.wordpress.com/ - area downloads) and is accessible without any registration to the site, without password in the file itself and above all..." has been put on the internet!!" if I had not done the least mention that I had taken it on the internet and that I had not created it, no one would have put the problem; I don't want to criticize anyone and I'm still partially in agreement with shape. not knowing who uploaded the original file I can not thank him anyway otherwise I would have already done it. one thing is certain, now that the copyright of the new file has been modified is definitely wave. ;-) you are great!! a greeting soon
 

Forum statistics

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

Members online

No members online now.
Back
Top