Multiple Block Insert (coordinates, label text) from Command Line- Syntax?

Multiple Block Insert (coordinates, label text) from Command Line- Syntax?

Anonymous
Not applicable
5,788 Views
8 Replies
Message 1 of 9

Multiple Block Insert (coordinates, label text) from Command Line- Syntax?

Anonymous
Not applicable

A surveying point problem. Civil 3D makes it easy but I will only be using AutoCAD. I do not want to use Lisp programs if I can do it pasting multiple lines at the command line (or using a .scr file). I have tried several answers on forums but they all fail... "-insert blockname", is as far as I can get working.

I can insert multiple points from the command line with no text attribute but the text and point descriptions are important.  Inserting points and text next to them is easy but not a good solution as they may need extracting again together for work on site.

I made a block (centre point = coordinates) with a text attribute for description but need help with the correct syntax to input all the values at the command line. After -INSERT BLOCKNAME , I have to input the rest of the data one by one. If I can get the whole line input in one go then I can use the Multiple command to enter all the points.

 

-INSERT BLOCKNAME X,Y,Z SCALE ROTATION ATTRIBUTE TEXT VALUE

 

Example I'm trying:

-INSERT BLOCKNAME 100.123,200.456,25,789 1 0 stationA

 

If anyone knows the correct syntax to get the whole line input in one go ... I would be very grateful. I have seen suggestions with single quotes, double quotes, brackets, but nothing works.

Or confirmation it is not possible, and I need to use Lisp or other addon programs.

Andy

AutoCAD 2017, Windows 10. Recent new user of AutoCAD.

 

Addition

I might add another text attribute so there could be two to input.

0 Likes
Accepted solutions (1)
5,789 Views
8 Replies
Replies (8)
Message 2 of 9

leeminardi
Mentor
Mentor
Accepted solution

See my post #9 at the following link

I used ASCII character 34 (quote) to keep the Excel concatenate function from getting confused with the use of "" as a text delimiter and as text.  You  can copy/paste the result into the AutoCAD command line.

 

 

lee.minardi
0 Likes
Message 3 of 9

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... 

Example I'm trying:

-INSERT BLOCKNAME 100.123,200.456,25,789 1 0 stationA

....


That , should be a .

Kent Cooper, AIA
0 Likes
Message 4 of 9

leeminardi
Mentor
Mentor

The following should work for you.

ex11.JPG

=CONCATENATE("(command ",CHAR(34),"-insert",CHAR(34)," ",CHAR(34),A2,CHAR(34)," ", CHAR(34),B2,",",C2,",",D2,CHAR(34)," ",E2," ",F2," ",G2," ",H2," ",I2,")")

 

lee.minardi
Message 5 of 9

Anonymous
Not applicable

@Kent1Cooper wrote:

@Anonymous wrote:

.... 

Example I'm trying:

-INSERT BLOCKNAME 100.123,200.456,25,789 1 0 stationA

....


That , should be a .


That's probably my typo changing from real coordinates. I didn't use those figures in autocad.

0 Likes
Message 6 of 9

Anonymous
Not applicable

Thanks for the quick replies. I will try these and  get back to mark it solved if ok.

Spent so many hours fiddling with it - hope it works.

Andy

0 Likes
Message 7 of 9

Paul_Gander
Advocate
Advocate

If you are not confident in using lisp, you might be interested in a reply I've just posted to a similar question on the LT forum. I've created a spreadsheet with a macro button that will convert a | (pipe) character to an enter character when copying and pasting commands from excel to AutoCAD/LT.

https://forums.autodesk.com/t5/autocad-lt-forum/insert-block-based-on-an-excel-sheet/td-p/8124637 

0 Likes
Message 8 of 9

Anonymous
Not applicable

Thanks Lee,

This answer worked perfectly (previous post ). This is the only place I can find with a complete answer.

Setting OSNAPS on or off didn't make a difference but  ATTDAI default set to 1 forces the 'Enter Attribute' dialogue box to open and break the command.

 

(setvar 'ATTDIA 0) beforehand and it works perfectly.

 

Paul,

I will try the Excel sheet and macro - it's a nice idea. Thanks for spending the time.

Topic= solved.

 

 

 

0 Likes
Message 9 of 9

parthiban_karnan79BH3
Community Visitor
Community Visitor

it worked for me, thanks

0 Likes