+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2012
    Posts
    3

    Question Display file explorer Lip

    Registered forum members do not see this ad.

    Dear autocad users / lisp writers,

    Could somebody please help me.

    I wrote this .lisp file

    (defun c: x x () ; Put Xref to right layer ; edited the line, otherwise it shows a angry smiley
    (command "-layer" "Make" "Xref" "color" "8" "Xref" "")
    (command "-Xref" "Attach" "" "0,0" "1" "1" "0" "")
    )


    In the second (command) line, i want it to attach a xref file and
    i want it to ask me what file i want to put in.
    Otherwise i'll have to write a whole lot of lisps...

    Is there perhaps a way to make it display the file explorer?

    I hope somebody can help me with this lisp.
    Thanks in advance.

    Greets,
    Michel
    Last edited by weedseed85; 16th Aug 2012 at 10:25 am.

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,008

    Default

    To allow the user to select a file check the GETFILED function.

    Also, please edit your post and add the required code tags. Thank you.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  3. #3
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2012
    Posts
    3

    Default

    Thank you for your reply.
    I've tried to edit the code part, like you asked. But i couldn't find the right way.

    I've marked it with red. Hopefully it's acceptable now.

    Thanks again.

  4. #4
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,008

    Default

    When edit the post, check that there is a button named Go Advanced - it will open the post in an editor with more options; there select the code part and check for a toolbar button marked #. When you post a new message this button is available in basic editor too.
    Alternatively may place the tags by hand: just write "[/code]" at the end of code and "[code]" at beginning.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  5. #5
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2012
    Posts
    3

    Laughing

    I would like to thank your very much for your help.

    Here's the end result of my code. Perhaps it's also use to
    somebody else.


    Code:
    (defun c:xx () ;  Zet Xref op juiste laag
     
    (command "-layer" "Make" "Xref" "color" "8" "Xref" "")
    (command "-Xref" "Attach" (getfiled "Select Reference File" "K:\Tekeningenbeheer" "dwg" 8) "0,0" "1" "1" "0" "")
    
    (command "-layer" "set" "0" "")
    )
    Have Fun!

    Greets,
    Michel

  6. #6
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,134

    Default

    Registered forum members do not see this ad.

    Please edit your first post to include CODE TAGS!!
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



Similar Threads

  1. Open file display at top of window does not match, 2012 Civ 3D
    By hanneh in forum AutoCAD Bugs, Error Messages & Quirks
    Replies: 3
    Last Post: 6th Dec 2011, 07:26 pm
  2. Display overwrite alert when saving an ASCII file
    By Tyke in forum .NET, ObjectARX & VBA
    Replies: 2
    Last Post: 23rd Sep 2010, 03:32 pm
  3. File Selection Display box question
    By MichaelJ07 in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 2
    Last Post: 30th Mar 2010, 04:23 am
  4. File Name Display
    By Tankman in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 23rd Jan 2009, 08:13 pm
  5. Xref reload does not display changes in host file
    By Tconn in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 20th Dec 2006, 01:47 pm

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