+ Reply to Thread
Page 5 of 5 FirstFirst ... 3 4 5
Results 41 to 48 of 48
  1. #41
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows 8.1
    Discipline
    Landscape
    Using
    AutoCAD 2015
    Join Date
    Apr 2010
    Posts
    2,957

    Default

    Registered forum members do not see this ad.

    Try changing this and see what happens

    Code:
    ...
    (setq fname (strcat (getvar 'dwgprefix)  (getstring "\nEnter file name ")))
    
    ....(close fout)
    (startapp "Notepad"   fname)
    ....

  2. #42
    Junior Member
    Using
    AutoCAD 2010
    Join Date
    Mar 2013
    Posts
    23

    Default

    Command: ; error: malformed string on input

  3. #43
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows 8.1
    Discipline
    Landscape
    Using
    AutoCAD 2015
    Join Date
    Apr 2010
    Posts
    2,957

    Default

    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

  4. #44
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,888

    Default

    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
    A man who never made mistakes never made anything

  5. #45
    Junior Member
    Using
    AutoCAD 2010
    Join Date
    Mar 2013
    Posts
    23

    Default

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

    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
    Attached Images

  6. #46
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,888

    Default

    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.
    A man who never made mistakes never made anything

  7. #47
    Luminous Being BlackBox's Avatar
    Computer Details
    BlackBox's Computer Details
    Operating System:
    Windows 8.1 Professional, Server 2012 R2 Datacenter
    Computer:
    Dell Precision T3600
    CPU:
    Hex-Core Intel Xeon 3.2Ghz
    RAM:
    32GB
    Graphics:
    3GB NVIDIA Quadro K4000
    Primary Storage:
    2 x 240GB Samsung EVO SSD (RAID 0)
    Secondary Storage:
    1TB Western Digital VelociRaptor 10K RPM
    Monitor:
    Dual 24" Dell Ultrasharp Widescreen Monitors
    Discipline
    Civil
    BlackBox's Discipline Details
    Occupation
    Senior Civil Designer
    Discipline
    Civil
    Details
    Public/Private Land Development, Transportation, and Utilities.
    Using
    Civil 3D 2016
    Join Date
    Nov 2009
    Posts
    5,282

    Default

    Quote Originally Posted by BIGAL View Post
    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:

    Code:
    DEF
    456
    YY
    ... And you're after

    Code:
    (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
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Sincpac C3D ~ Exchange Apps ~ Autoloader ~ AutoCAD Security

  8. #48
    Forum Newbie
    Discipline
    Civil
    Using
    AutoCAD 2010
    Join Date
    Nov 2016
    Posts
    8

    Default

    Registered forum members do not see this ad.

    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.

Similar Threads

  1. Extracting xyz coordinates from 3d polylines
    By 1ridgey in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 13th Apr 2012, 02:08 am
  2. How to do this handle????
    By stevep80 in forum AutoCAD 3D Modelling & Rendering
    Replies: 8
    Last Post: 3rd Jan 2012, 08:08 pm
  3. extracting cursor coordinates
    By rusty in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 29th Jun 2006, 10:30 am

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts