Easy way to plot and label items

Easy way to plot and label items

ctnycc
Advocate Advocate
1,738 Views
7 Replies
Message 1 of 8

Easy way to plot and label items

ctnycc
Advocate
Advocate

Hi everyone,

 

Great idea this answer day if it works for me.

 

I have a query for which i partly have the answer,  I have several points which are plotted as single lines using the data from a spreadsheet.  I would now like to add some text after each line has been drawn so i can identify whichline relates to each data point in the spreadsheet.

 

An example of the line command i am using  is below.

 

Line 486057.71,512851.35 484919.71,513136.58

 

Line 486285.39,512547.16 486057.93,512850.95

 

I would like to incorporate the text command after the line has been drawn which will take the number from the spreadsheet for the corresponding line and place the label text alongside the line before going to draw the next line.

 

Can anyone help here?

 

Thanks in advance

 

Colin from the UK

 

0 Likes
Accepted solutions (1)
1,739 Views
7 Replies
Replies (7)
Message 2 of 8

john.vellek
Alumni
Alumni

Hi @ctnycc,

 

Which version of AutoCAD  are you using?

 

Can you walk me through the process you are using to get the data from the spreadsheet and into your drawing? For instance, are you running some sort of import via a LISP routine?

 

If this is all manual, YOu might be able to right a simple script that does the line work and then adds a piece of text or even a Field which could potentially give you even more functionality.

 

Please post your answers in this thread and I will try to assist you.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 3 of 8

ctnycc
Advocate
Advocate

Hi John

i am using 2012, I am simply copying the coccatenated data from excel and pasting into the command line which works very well for the lines.  The excel spreadsheet takes the x and y coordinates of the first point and coccatenates the other coordinates of the second point with the comma and spaces where required.  I just want to extend this to incorporate this with a label after each line is drawn to make it easier to identify each one from the spreadsheet.

 

Thanks for any help on this

 

colin

0 Likes
Message 4 of 8

john.vellek
Alumni
Alumni

Feel free to attach a sample file(s) so I can take a look. My first thought would be to add a column for your line tag. Then convert the Excel file into a script file in some fashion. I would be happy to take a quick look if you like.

 

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 5 of 8

ctnycc
Advocate
Advocate

Hi John,

 

Attached is the spreadsheet and drawing.

 

The spreadsheet:-  The two seperate elements i.e. the line (column K) and the label and point(column L) work seperately.  I have tried to combine the two, and it seems to be going wrong somewhere.

 

The point insertion is placed at the mid point of the line which has been calculated in the cells to the right.

 

Would you be able to help on this?

 

 

PS i  looked up points labelling which helped a bit with this, however i would appreciate a bit of background on the bits and pieces behind the formula

="(command ""_-INSERT"" ""myPOINT"") " & A7 & "," & B7 &" 1 0 " & C7   e.g. the ampersand character  and the reasoning behind the bracket and "

 

 

Regards

 

Colin

 

 

 

0 Likes
Message 6 of 8

john.vellek
Alumni
Alumni
Accepted solution

Hey there @ctnycc,

 

I don't know that this is totally cleaned up but take a look at this Excel file. If you copy the last column and paste into a text file ending with a "SCR" extension, then you can run the script and it creates the lines and labels.

 

Please hit the Accept as Solution button if my post fully solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 7 of 8

john.vellek
Alumni
Alumni

Hi @ctnycc

 


I am checking back to see if my post helped you with your problem. Please add a post with your results so other Forum users can benefit.

Please hit the Accept as Solution button if my post fully solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 8 of 8

ctnycc
Advocate
Advocate

Thanks John

 

Regards

 

Colin

 

0 Likes