Jump to content

Extracting X,Y, coordinates with Handle


Drafty

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 47
  • Created
  • Last Reply

Top Posters In This Topic

  • Drafty

    21

  • BIGAL

    20

  • pBe

    3

  • Tyke

    1

Top Posters In This Topic

Posted Images

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 years later...

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