Jump to content

Recommended Posts

Posted

Hello everybody.

 

I have a lisp that I made recently, which has some multiple options by Lisp , and I thought it could be better and much clearer to user to deal with in DCL options, but the problem that I do not know is the image of the varies options of the Lisp Design .

 

the Image of the DCL could be like the Dimension or multiLine Style ....... so on.

 

Many Thanks

Tharwat

Photo.jpg

  • Replies 29
  • Created
  • Last Reply

Top Posters In This Topic

  • MSasu

    8

  • Tharwat

    8

  • Qonfire

    4

  • mitchellrodhous

    3

Top Posters In This Topic

Posted Images

Posted

You will have to create slides (MSLIDE command) to use it as images on your dialog boxes.

 

Regards,

Posted

Hi msasu

 

But the slides would get photos of the current drawing, things like -print screen- , And I would like to make it according to the actions of my Lisp........

 

Any idea ....... ?

 

Thanks and regards.

 

Tharwat

Posted

You will need to make a sketch of the image that you want to display on dialog and zoom on it before issue the MSLIDE command - see this tutorial to get started.

 

Regards,

Posted

correct, in your lisp you can call it like fellowing:

you image has to be saved in I believe an searchin path....

with command MSLIDE you can save the image...

 

[/font]
[size=2][font=Arial];;;--- First we need a slide name 
(setq [color=#ff0000]mySlideName[/color] "c:/acad/myslide.sld")[/font][/size]
[size=2][font=Arial];;;--- Second we need the key to the image control 
(setq [color=#0000ff]myKey[/color] "sld")[/font][/size]
[size=2][font=Arial];;;--- Next we send the slide name and the key to the update function 
(upDateImage [color=#ff0000]mySlideName[/color] [color=#0000ff]myKey[/color])[/font][/size]
[size=2][font=Arial]; [b]NOTE:[/b] Notice [color=#ff0000]mySlideName[/color] becomes [color=#ff0000]sldName[/color] and [color=#0000ff]myKey[/color] becomes [color=#0000ff]key[/color] when passed 
;       as parameters to the upDateImage function.[/font][/size]
[font=Arial][size=2];;;--- Function to update the slide[/size][/font]
[font=Arial][size=2](defun upDateImage([color=#ff0000]sldName[/color] [color=#0000ff]key[/color])          [/size][/font]
[font=Arial][size=2]  ;;;--- Get the width of the slide
 (setq width (dimx_tile [color=#0000ff]key[/color]))[/size][/font]
[size=2][font=Arial]  ;;;--- Get the height of the slide 
 (setq height (dimy_tile [color=#0000ff]key[/color]))[/font][/size]
[font=Arial][size=2]  ;;;--- Start the slide definition
 (start_image [color=#0000ff]key[/color])[/size][/font]
[font=Arial][size=2]  ;;;--- Wipe out the background
 (fill_image 0 0 width height 0)[/size][/font]
[font=Arial][size=2]  ;;;--- Put the slide in the image area
 (slide_image 0 0 width height [color=#ff0000]sldName[/color])[/size][/font]
[font=Arial][size=2]  ;;;--- Finish the slide definition
 (end_image)[/size][/font]
[font=Arial][size=2])[/size][/font]
[font=Arial]

°copied from jefferypsanders°

 

In your DCL

 

[/font]
[font=Arial]: image { 
 key = "sld"; 
 height = 30; 
 width = 30;  
    color = 0;
 is_enabled = false; 
 is_tab_stop = false;
} [/font]
[font=Arial]
Posted
You will need to make a sketch of the image that you want to display on dialog and zoom on it before issue the MSLIDE command - see this tutorial to get started.

 

Regards,

 

I think I typt to slow..

Regards MR

Posted

Thanks msasu ....

and Thanks mitchell

 

so nice .....

 

and what is the key that would control of the image display while

a user choosing different types of the DCL options....???

 

Could anyone indicate it to me ...?

 

Many Thanks

 

Tharwat

Posted

Just clear the image tile using FILL_IMAGE and load another slide.

Please don't forget that each time you access an image tile you shold start the process (START_IMAGE) respectively close it (END_IMAGE).

 

Regards,

Posted

Thanks gentle men.

 

Now the image is coming up clearer and clearer in front of me with no fog , except the display of the image.

 

I mean how could the slide image converting from slide to another with the fill image, for example when a user trying to select different numbers from a pop-up List ..... ?

 

Best regards.

 

Tharwat

Posted

You mean changing image by selecting another option in your list?

Posted

See the code below to understand the procedure to load a slide on an image tile:

 

(start_image "MyImageTile")                                                               ;this will start image actions
(fill_image  "MyImageTile" 0 0 (dimx_tile "MyImageTile") (dimy_tile "MyImageTile") -15)   ;this will clear previous display
(slide_image "MyImageTile" 0 0 (dimx_tile "MyImageTile") PathOfSlideFile)                 ;this will load a slide image
(end_image)                                                                               ;this will close image actions

 

Regards,

Posted

Thanks msasu & Mitchell

 

 

That's great and much clearer .......

 

My best regards.

 

Tharwat

  • 1 year later...
Posted (edited)

Hi

Since I'm struggling for the 3rd day on this question I decided to ask about it

why do you think its not working...black backround...

 

 

;;;--- First we need a slide name 
(start_image "sld")
(slide_image  0 0 (dimx_tile "sld")(dimy_tile "sld")
"C:\Users\Noro\Desktop\lisp\q.sld") ;;;;;;;;;;;;;;;;looks like wrong file specification
(end_image)








////////////////////
: image { 
  key = "sld"; 
  height = 30; 
  width = 30;  
     

}

Edited by Qonfire
Posted

Please try:

 

(slide_image  0 0 (dimx_tile "sld")(dimy_tile "sld") "C:\[color=red]\[/color]Users\[color=red]\[/color]Noro\[color=red]\[/color]Desktop\[color=red]\[/color]lisp\[color=red]\[/color]q.sld")

 

Regards,

Mircea

Posted

how to make slide image take the size of a tile, or at least make it bigger ?

Posted

My solution is to make the slide in Layout mode into a viewport that match the length/height ratio of my DCL image tile.

 

Regards,

Mircea

Posted

Msasu many many thankyous...just curious where you got that info from?

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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