Hello there; I have a text in my dcl but want it to be a clickable url. Is this posible? MJ
Marcel, Here are the fragments: Place Button in .dcl, with url as 'Label'. : button { label = "http://www.bobscadshop.com"; key = "url"; } In Lisp: At top of Dialog control section.. (setq gothere nil) (action_tile "url" "(setq gothere 1)(done_dialog 4)") ..... (unload_dialog dcl_id) (if gothere (command "_browser" "http://www.bobscadshop.com") ); if Cheers: ) Bob
Unfortunatly I just noticed this cannot be done leaving the dialoge opened. You're certain there are no other ways? It's not a big problem, but would be nice dough. M
Leaving the dialog 'open' is a problem..you (really) want to close that, then go browsing..the button method works - right ?. For double-click on the text, you could try a text_box, (and) check that tile, exit dialog, and browser..would work in the same fashion. Bob
This seems to work with a 'button' or 'edit_box' in the .dcl -------------------------- (if (not (new_dialog "test_url" dcl_id)) (exit)) (set_tile "url2" "http://www.bobscadshop.com") ;; Fire-up the Dialog (setq url nil gothere nil) (setq what_next 7) (while (/= 4 what_next) (action_tile "url" "(setq gothere 1)(done_dialog 8)"); button (action_tile "url2" "(setq url $value)(done_dialog 8)"); edit_box (action_tile "accept" "(done_dialog 4)") (action_tile "cancel" "(done_dialog 4)") (setq what_next (start_dialog)) (unload_dialog dcl_id) (cond ( (= what_next 8) (if gothere (progn (command "_browser" "http://www.bobscadshop.com") ); progn ); if (if url (progn (command "_browser" url) ); progn ); if (setq dcl_id (load_dialog chk_file)) (if (not (new_dialog "test_url" dcl_id)) (exit)) (set_tile "url2" "http://www.bobscadshop.com") ); what_next=8 ); cond ;; ); end while what_next -------------------- The trick here is to 'fire-up' the dialog again... as in: (setq dcl_id (load_dialog chk_file)) (if (not (new_dialog "test_url" dcl_id)) (exit)) (set_tile "url2" "http://www.bobscadshop.com") Bob
There's other ways, but I don't think you're after what the LaunchBrowserDialog method does, since you already know the URL and only want to open it in Explorer. In that case, you can use this: (defun navigate (url / shell) (vl-load-com) (setq shell (vla-get-interfaceobject (vlax-get-acad-object) "Shell.Application" ) ) (vlax-invoke-method shell 'Open url) (vlax-release-object shell) ) As far as not using a button to do this in DCL, that's not possible, but you might be able to fake it using a slide image (big kludge).
oops. Did it again! In that function, change this 'vla-get-interfaceobject' to this 'vla-getinterfaceobject'
Earlier I solved it like this; (action_tile "url" "(c:mywebsite)") (defun c:mywebsite () (startapp "C:\\Program Files\\Internet Explorer\\iexplore" "http://www.mywebsite.nl") ) But I Guess yours works also when IE is installed in a different location or when I use a different browser? I'm using yours now. Thanx! M
Um, yeah, what you have posted would definitely cause a problem for some people. Why not just use (command "._browser" "http://MyURL") Matt