Author Topic: Variable Picture  (Read 7758 times)

0 Members and 1 Guest are viewing this topic.

MichaelJ

  • Guest
Variable Picture
« on: September 01, 2010, 12:20:21 PM »
Hello,

I have created a new Dialog with a picture. The Name of the Picture ist 100. I have make a Link with the Picturelist.
My Lisp-Routines make with every saving a new Picture with the same name.
I want to have a Update from the picture in my Dialog. But I don’t happened…
The Dialogs shows always the first picture.

My code in my LSP is :

(defun c:AuftragsdatenX_Dialog1_OnInitialize (/)
(dcl_Control_SetPicture AuftragsdatenX_Dialog1_ 100)
)

Is this Functionality possible ? Have anybody a idea?

Michael

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Variable Picture
« Reply #1 on: September 02, 2010, 12:09:48 PM »
Hello,

I have created a new Dialog with a picture. The Name of the Picture ist 100. I have make a Link with the Picturelist.
My Lisp-Routines make with every saving a new Picture with the same name.
I want to have a Update from the picture in my Dialog. But I don’t happened…
The Dialogs shows always the first picture.

My code in my LSP is :

(defun c:AuftragsdatenX_Dialog1_OnInitialize (/)
(dcl_Control_SetPicture AuftragsdatenX_Dialog1_ 100)
)

Is this Functionality possible ? Have anybody a idea?

Michael


Hi Michael,
didn't tested with OpenDCL...
but this work with ObjectDCL.

(Odcl_Control_SetPicture project_Dialog_Control 100)

but I think the problem is that you have written the wrong variable name.
Keep smile...

MichaelJ

  • Guest
Re: Variable Picture
« Reply #2 on: September 02, 2010, 01:12:24 PM »
Hey,

The command "Odcl_Control_SetPicture " doesnt exist in openDCL. The name of the variables is correct - i have checked it... :-(

It must be exist  a solution for this problem


Michael

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Variable Picture
« Reply #3 on: September 02, 2010, 07:11:14 PM »

Michael, your syntax appears to be correct.

Can you clarify what you are trying to do.

Is it
Change the Picture in the Control
or
Replace the Picture in the List ?

Can you post an example Dialog and Lisp Control code ?
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Variable Picture
« Reply #4 on: September 02, 2010, 07:14:02 PM »

Have you posted as AutoKAD on the OpenDCL Forums ?
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.

MichaelJ

  • Guest
Re: Variable Picture
« Reply #5 on: September 03, 2010, 07:51:22 AM »
I have created a new Dialog with a picture and the name in OpenDCL is “TEST01_Dialog1_”
Then I have make a setting to the picture. I have select Number 100 of the Picturelist in OpenDCL. The Name of the Picture is “Picture.jpg”.
This File is changing every time. My Mainprogram make with every saving a new “Picture.jpg”.
The problem is, that the Dialog shows only the “first” “Picture.jpg”. It must be a update from the picture and must be show the newest “picture.jpg”.

If you want to simulate you must change the picture manuel, with the same name.

I hope you can understand me…

I don’t posting with the name “AutoKAD”.

Michael

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Variable Picture
« Reply #6 on: September 03, 2010, 08:10:29 AM »

It is doing what you told it to do ... loading < PictureID 100 > ... and works fine for me,

The stored images do not have neames , they have ID numbers. I've wanted this to be changed for years, but that's another story ... and we work with what we have :)

So, if you want to display a file you need to tell the dialog to do that.

I'll have a play shortly if you like.
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Variable Picture
« Reply #7 on: September 03, 2010, 08:32:03 AM »

Have a play with this ..

Code: [Select]

(command "OPENDCL")


(defun c:Test01 (/) (dcl_project_load "Test01" t) (dcl_form_show Test01_Dialog1))

(defun c:TEST01_Dialog1_OnInitialize (/)
  ;; Display the built in Picture
  (dcl_Control_SetPicture TEST01_Dialog1_piccy 100 )
 
)

(defun c:TEST01_Dialog1_Button1_OnClicked (/)
  (dcl_PictureBox_LoadPictureFile TEST01_Dialog1_piccy "Picture1.jpg" nil)
)
(defun c:TEST01_Dialog1_Button2_OnClicked (/)
   (dcl_PictureBox_LoadPictureFile TEST01_Dialog1_piccy "Surprise.jpg" nil)
)

(princ)
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Variable Picture
« Reply #8 on: September 03, 2010, 08:39:17 AM »
This is what it looks like my end.

The video is a little messy..


[BTW] Have you been here ?? http://www.opendcl.com/forum/index.php
« Last Edit: September 03, 2010, 08:48:58 AM by Kerry »
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Variable Picture
« Reply #9 on: September 06, 2010, 05:59:10 AM »

hello !! ... anyone there ??
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.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Variable Picture
« Reply #10 on: September 07, 2010, 09:11:59 AM »
I think he wants to dynamically update the picture loaded in the odcl file at runtime - which I understand can't be done.  The only solution is to set up a folder and save jpegs there to load into the picture control.

OP: am I close?
James Buzbee
Windows 8