Jump to content

Recommended Posts

Posted

Hi,

 

I want to know how can I dequote so to say, a reading from a read-line command.

 

To be more specific, I have a TXT file with coordinates and heights, space delimited, and I would like to read the whole line (or parts of it) as not string.

 

expl:

...read-line -> "97451586.021 4869451.235 268.256"...

well I wan't to know how can I extract the data between the quotation marks

 

Thanks

Posted

What are you going to do with the data once it is read?

Posted
What are you going to do with the data once it is read?

Well I was just thinking about that.

 

For now lets just say, I want them in the drawing as points.

How would I go about that?

Posted

You're welcome aleksa, glad it helps :thumbsup:

 

For space-delimited data, you can also use the following 'shortcut' to interpret the data:

(read (strcat "(" <your data> ")"))

Posted

Even better.

I was actually looking for something like this!

 

Thanks to all!

Posted

Also...

 

(setq str "123.123 456.456 789.789")
(setq Xcoord (substr str 1 (vl-string-position (ascii " ") str)))
(setq Ycoord (substr str (+ (vl-string-position (ascii " ") str) 2) (- (vl-string-position (ascii " ") str nil T) (vl-string-position (ascii " ") str))))
(setq Zcoord (substr str (+ (vl-string-position (ascii " ") str nil T) 2) (- (strlen str) (vl-string-position (ascii " ") str nil T) 1)))
(setq point (list (read Xcoord) (read Ycoord) (read Zcoord)))

Posted

E Marko, hvala ti!

 

Bas sad gledam u Help-u taj SUBSTR. Još i ponajbolje rešenje.

Posted

Nema na cemu, Aleksa... Inace ako imas zareze u stringu, samo promeni (ascii " ") u (ascii ",")... Inace zarez je cest delimiter kod CSV fajla (C-Comma Delimited) koji je cesto u upotrebi pri koriscenju transfera podataka ACAD EXCEL...

 

Puno pozdrava i nema na cemu, M.R.

Posted
Hi

With this program you can get that, Mr. lee me if you can help me with an example.

Thank you

 

Hi mehrdad,

Are you unsure how to use my program?

What are you trying to do?

Posted
Hi mehrdad,

Are you unsure how to use my program?

What are you trying to do?

 

Hi

I dont know what the program does and whether I'm at work using PDMS

Thank you

Posted
Hi

I dont know what the program does and whether I'm at work using PDMS

Thank you

 

The program is designed to run on AutoCAD and other software that enables AutoLISP & Visual LISP functionality (such as Civil3D / MEP etc.), to my knowledge, PDMS doesn't permit the use of AutoLISP or Visual LISP.

 

As for what the program does, please read the description on my site.

 

Lee

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...