Charpzy Posted November 3, 2022 Posted November 3, 2022 I'm creating a block selector which imports images into a drawing, it is possible to add a image box to display a none slide image like jpeg, png or something? I've tried creating a slide but it shows nothing when loaded into the dialog .dcl file: NOTES :dialog { label = "Select a Note"; : row { : boxed_column { label = "Notes"; : list_box { height = 10; width = 35; key = "folderlist"; multiple_select = false ; } } : boxed_column { label = "Preview"; : image { key = "imageV"; color = dialog_background; width = 35; height = 15; } } } spacer; ok_only; } Quote
rlx Posted November 3, 2022 Posted November 3, 2022 Short answer : nope. DCL is very limited. It can only show slides or vector images. OpenDCL maybe can do this. I have no experience with this because on my work every single file is blocked by default unless it's 'white listed' so users can't install anything themselves. Even updates can be a nightmare. You can insert image in AutoCad and make a slide but result is usually very poor. Or you could try something like ShellOpen to launch a file (image) with its native program (paint etc) but that's probably not what you're after. Don't know about visual basic or .net , you can do more with these languages but same story , no-can-do for me because of company policy. If your images are simple or symbolic of nature you could draw simple version in AutoCad and make slide but this is only worth it if number of images is small. Quote
BIGAL Posted November 3, 2022 Posted November 3, 2022 Your slides should work as I have posted to you images of multiple slides in a custom dcl in other posts. dd3x3 : dialog { label = "Please choose item"; : column { : row { : image_button { key = "33sq1"; width = 35; aspect_ratio = 0.85; color = 0; allow_accept = true; } : image_button { key = "33sq2"; width = 35; aspect_ratio = 0.85; color = 0; allow_accept = true; } : image_button { key = "33sq3"; width = 35; aspect_ratio = 0.85; color = 0; allow_accept = true; } One of the issues is that slides have been around since year dot. So with like 4K screens the slides do not work as the image is tiny, so when making the slide I make my CAD screen about a 1/4 of screen display, zoom extents, zoom 0.9xp, this makes the image a nice size on the screen then mslide, you can check using Vslide if it looks ok. if not drag the screen size. ; calculates next slide (defun alan4 () (setq x (+ x 1)) (setq sldname (nth x ai_pts_lst)) ) (setq x -1) (foreach pts0 sld_lst ; sld_lst is a list of slide names (alan4) (start_image pts0) (slide_image 0 0 (- (dimx_tile pts0) 1) (- (dimy_tile pts0) 1) sldname) (end_image) ) Quote
asos2000 Posted November 4, 2022 Posted November 4, 2022 Give this a try https://www.theswamp.org/index.php?topic=20878.msg255063#msg255063 Quote
tombu Posted November 5, 2022 Posted November 5, 2022 On 11/3/2022 at 9:12 PM, asos2000 said: Give this a try https://www.theswamp.org/index.php?topic=20878.msg255063#msg255063 Terry's been a great source of lisp code and instruction especially dcl dialogs, he's bounced around on a few different web addresses since TerryCAD though. This has been his current address for tutorials on dialog boxes a couple years now: https://autolisp-exchange.com/Tutorials/MyDialogs.htm Quote
Recommended Posts
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.