Jump to content
weedseed85

Display file explorer Lip

Recommended Posts

weedseed85

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

:D

Edited by weedseed85

Share this post


Link to post
Share on other sites
MSasu

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.

Share this post


Link to post
Share on other sites
weedseed85

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.

Share this post


Link to post
Share on other sites
MSasu

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 "

" at beginning.

Share this post


Link to post
Share on other sites
weedseed85

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.

 

 

(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"  "0,0" "1" "1" "0" "")

(command "-layer" "set" "0" "")
)

 

Have Fun!

 

Greets,

Michel

Share this post


Link to post
Share on other sites
SLW210

Please edit your first post to include CODE TAGS!! :rtfm:

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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