Author Topic: Is it possible put a photo in dialog box  (Read 5366 times)

0 Members and 1 Guest are viewing this topic.

Adesu

  • Guest
Is it possible put a photo in dialog box
« on: May 28, 2007, 09:47:11 PM »
Hi Alls,
I'm not sure a photo able to put in dialog box, any idea or guide me to true way
Code: [Select]
mp : dialog {label = "MY PHOTO IN DIALOG";
   spacer;
   : column {
   : image {key = "im" ;
            dialog_background = 0.0;
            fixed_width = true;
            alignment = centered;
            height = 10;
            width = 25;}
   ok_only;}}         

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Is it possible put a photo in dialog box
« Reply #1 on: May 28, 2007, 10:50:57 PM »
How about ;

Convert the Picture to BMP or similar.
Insert into ACAD as OLE object.

Make a slide.

Use the slide in the Dialog


Note: I haven't tried this, so it MAY not work.

///--

I personally use OpenDCL which has a pictureBox Control, which accepts picture files.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

terrycadd

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #2 on: May 29, 2007, 02:14:34 AM »
Kerry,
I liked your suggestion of inserting a bmp file as an ole object, and then making a slide file. The resolution was great for the ole object, but the vslide command doesn’t see the object.  I tried the “Insert / Raster Image” approach with a bmp file.  The resolution was fuzzy.  It could make a slide with the mslide command, and view it with the vslide command.  The result was poor, to say the least, as AutoCAD converts it into its own 255 color spectrum.  The main problem with slides and dcl height and width considerations is that you have to adjust your AutoCAD screen size to the proportion of what you need to see in the dcl image tile.  You may need to dock extra vertical or horizontal tool-bars, to re-size the screen size closer to what you need for an mslide shot, but it can work.
Terry

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Is it possible put a photo in dialog box
« Reply #3 on: May 29, 2007, 04:40:06 AM »
  The main problem with slides and dcl height and width considerations is that you have to adjust your AutoCAD screen size to the proportion of what you need to see in the dcl image tile.  You may need to dock extra vertical or horizontal tool-bars, to re-size the screen size closer to what you need for an mslide shot, but it can work.
Terry


I think I used to have a scaleable rectangle I'd use as a template, then undock the drawing area and zoom extents on the template and then resize the viewing pane with the mouse to coincide with the edges of the template, then hide the template layer ... long time ago though, so an old memoty :-)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

efernal

  • Bull Frog
  • Posts: 206
Re: Is it possible put a photo in dialog box
« Reply #4 on: May 29, 2007, 03:26:21 PM »
find out width and height of image tile (dimx_tile, dimy_tile);;
for instance, 50x26

in layout, make a mv witth these dimensions and insert the draw (zoom extents, zoom 0.9x)
make the slide...
it will fit your image tile perfectlly

e.fernal
e.fernal

qjchen

  • Bull Frog
  • Posts: 285
  • Best wishes to all
Re: Is it possible put a photo in dialog box
« Reply #5 on: May 29, 2007, 09:32:05 PM »
:)

I try to use objectdcl, it can load dwg.

and I use a little rountine to translate a bitmap into dwg , each pixel to a point or circle in truecolor, then it like this.



but sure it is not the right answer for your question, and I hope that the img file can be directly insert into dcl in truecolor.
http://qjchen.mjtd.com
My blog http://chenqj.blogspot.com (Chinese, can be translate into English)

Adesu

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #6 on: May 29, 2007, 11:21:15 PM »
Hi Kerry,
Thanks for your suggest, I'm still troubling to convert it and then create slide.

How about ;

Convert the Picture to BMP or similar.
Insert into ACAD as OLE object.

Make a slide.

Use the slide in the Dialog


Note: I haven't tried this, so it MAY not work.

///--

I personally use OpenDCL which has a pictureBox Control, which accepts picture files.

Adesu

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #7 on: May 29, 2007, 11:24:48 PM »
Hi efernal,
as your suggest, I interest it, but I'm still confusing to describe your tutorial, next I would test it.
Thanks very much.

find out width and height of image tile (dimx_tile, dimy_tile);;
for instance, 50x26

in layout, make a mv witth these dimensions and insert the draw (zoom extents, zoom 0.9x)
make the slide...
it will fit your image tile perfectlly

e.fernal


Adesu

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #8 on: May 30, 2007, 12:10:44 AM »
I just success to create OLE object a photo to drawing area, then create mslide it ok, but if that slide would be open by vslide, I can't see anything in drawing area, it only a rectangular blank, what happend it?

terrycadd

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #9 on: May 30, 2007, 11:26:32 AM »
Have you tried the “Insert / Raster Image” approach with a bmp file?  You can make a slide with the mslide command, and view it with the vslide command.

Adesu

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #10 on: June 01, 2007, 05:34:42 AM »
Hi Terry,
Thanks for your suggest, sorry for my late answerd, because in my office I got trouble for 2 days, my internet terible, I think would test as your suggest at next day monday.

Have you tried the “Insert / Raster Image” approach with a bmp file?  You can make a slide with the mslide command, and view it with the vslide command.

Adesu

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #11 on: June 04, 2007, 01:56:50 AM »
Hi,
I got solve that problem, here my experience
1). Open your window explorer
2). Select a your file photo
3). Right click your mouse
4). Hit copy
5). Open your program cad
6). Hit copypaste
7). Put any where...etc
8). Create mslide...etc
« Last Edit: June 04, 2007, 03:40:30 AM by Adesu »

terrycadd

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #12 on: June 04, 2007, 03:00:09 PM »
Adesu,
I like your suggestion on the copy and paste images verses the Insert/Raster Image method. I also found that you can paste gif images into AutoCAD with your suggestion. The Insert/Raster Image method doesn't allow gif images. There was also an excellent suggestion by e.fernal, about making an Mview on a layout to have better control over the size ratio when creating a slide.
Terry

Pither Rukka

  • Guest
Re: Is it possible put a photo in dialog box
« Reply #13 on: June 02, 2010, 01:25:14 AM »
Good Adesu!! this method result better resolution than use "Imageattach".

efernal

  • Bull Frog
  • Posts: 206
Re: Is it possible put a photo in dialog box
« Reply #14 on: June 02, 2010, 11:42:07 AM »
It works...
Keep image small...

e.fernal
e.fernal