Jump to content

Import multiple Blocks from CSV/txt file with coordinates


Recommended Posts

Posted
46 minutes ago, dlanorh said:

(setq a (10 20 30)) => ;error: bad function: 10. This is looking for a function called 10 (defun 10 ( a b / )......) with two parameters to pass in (setq a '(10 20 30)) => (10 20 30) (type a) => LIST but (setq b 20) (setq a '(10 b 30)) => (10 B 30) (type a) => LIST ; ' means literal b is not evaluated (setq a (list 10 b 30)) => (10 20 30) (type a) => LIST ;Now b is evaluated

i've wrote this down as a reminder, now it's pretty clearer, thanx again for the effort to explain it 👍 

Posted

Just a extra (kbn) this would be looked at as if you have a defun called kbn because you have enclosed it in brackets. This is the way you call a defun without passing any variables.

Posted
On 4/20/2019 at 6:23 PM, Tomislav said:

i still don't quite get it why list,list,list instead of  '(("Blocks" (kbn)) but must work on it

 

My article describing The Apostrophe and the Quote Function should shed some light on this and help with your understanding.

 

On 4/20/2019 at 6:03 PM, dlanorh said:

Try


    (Steal "D:\\Geodezija\\Kartografska zbirka\\1000_BLOKOVI.dwg"
           (list (list "Blocks" (list kbn)))
    ) ;_  Steal

 

 

Many thanks for assisting in my absence @dlanorh 🍺

Posted

Thanks to you too Lee, ruler of the Lisp land 😀👍

  • 5 years later...
Posted

Resurrecting an old thread, but I did a bunch of searching and this lisp routine does just about exactly what I'm looking to do, except I'm a total noob and can't figure out how to change it to:

 

1) force the z elevation to 0 - a 2d point would be preferred (I know I can change it to 0 in the CSV file, but it's got to be easy enough to force it through the routine and save the manual processing)

2) keep the original layer of the block being imported instead of it being put on the current layer

 

Does anyone happen to know what would need to be done?

 

Thanks in advance,

 

AJT

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...