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.
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.
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
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.
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
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.
Have Fun!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" "") )
Greets,
Michel
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
![]()
Bookmarks