Jump to content
Drafty

Extracting X,Y, coordinates with Handle

Recommended Posts

pBe

Try changing this and see what happens

 

...
(setq fname (strcat [b](getvar 'dwgprefix)[/b]  (getstring "\nEnter file name ")))

....(close fout)
[b](startapp "Notepad"   fname)[/b]
....

Share this post


Link to post
Share on other sites
Drafty

Command: ; error: malformed string on input

Share this post


Link to post
Share on other sites
pBe

Bigal will probably edit the code on post # 33 and will set you right.

 

The generated error [ ; error: bad argument type: streamp nil] is from the lack of a valid argument supplied to this line (close fout). Now what we did is ensure the path is valid via

(getvar 'Dwgprefix) and an additional function to open the created text file (startapp "Notepad" fname).

 

The error you're getting now is from something else entirely.[syntax]

 

Wait for Bigal to modify the code Drafty :)

Share this post


Link to post
Share on other sites
BIGAL

I ran it on your drawing and its fine Like Pbe I think the problem is in the directory name if you use a directory with a space in the name it can cause problems. Do the values appear on your screen press F2 ?

 

Also I have limited time at moment it needs a bit more cleaning up it needs a seperate routine for mtext so it recognises line by line.

 

ScreenShot014.jpg

Share this post


Link to post
Share on other sites
Drafty

Thanks guys. I changed the directory to "C:Test/" and added a file extension. That then worked :D

 

Command:

Enter file name test1.csv

Select objects: Specify opposite corner: 2 found

Select objects:

ABC\P123\PZZ

DEF\P456\PYY

Command:

 

The finish line is in sight. Please see the screen shot attached

Book1.jpg

Share this post


Link to post
Share on other sites
BIGAL

Can some help please with a simple mtext to line by line list I am not sure that the abc\\1234\\has more info in it. I am trying to finally fix this up for drafty.

Share this post


Link to post
Share on other sites
BlackBox
Can some help please with a simple mtext to line by line list I am not sure that the abc\\1234\\has more info in it. I am trying to finally fix this up for drafty.

 

I haven't read the entire thread, but I believe you're looking to parse the TextString Property string value by removing the myriad formatting characters (i.e., \P, etc.), where DEF\P456\YY is:

 

DEF
456
YY

 

... And you're after

 

(list "DEF" ;| delim char here? |; "456" "YY")

 

... Not sure if all of the various formatting characters are documented in one, single location (perhaps Lee knows? He's done a lot with this for BFIND I believe).

 

Cheers

Share this post


Link to post
Share on other sites
lraimo

Can somebody help me make change in the code?

I would like each coordinate to be on a separate line and empty row between each polyline.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×