Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
fill_image in OpenDCL
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: fill_image in OpenDCL (Read 2402 times)
0 Members and 1 Guest are viewing this topic.
mailmaverick
Bull Frog
Posts: 495
fill_image in OpenDCL
«
on:
May 25, 2019, 12:07:42 PM »
Hi
Can we use fill_image in OpenDCL PixtureBox or any other OpenDCL Control ?
If yes, then please let me know how. I have tried passing the OpenDCL Control name "c:Form/Main/PictureBox1" to fill_image but couldn't generate the image.
Thanks.
Logged
roy_043
Water Moccasin
Posts: 1895
BricsCAD 18
Re: fill_image in OpenDCL
«
Reply #1 on:
May 25, 2019, 12:33:57 PM »
The fill_image function is not an ODCL function. Look at dcl-SlideView-FillImage instead?
Logged
mailmaverick
Bull Frog
Posts: 495
Re: fill_image in OpenDCL
«
Reply #2 on:
May 25, 2019, 12:57:34 PM »
Thanks for reply.
I have particular lines stored as coordinates which I want to draw in either dcl-PictureBox or dcl-SlideView.
I've tried many syntaxes such as :-
(dcl-PictureBox-DrawLine "C:Form/Main/PictureBox1" (list (list 0 0) (list 10 10) 1))
(dcl-PictureBox-DrawLine "C:Form/Main/PictureBox1" (list (list 0 0 10 10 1))
but every time I get following error :-
Please help where the syntax is wrong ?
Logged
roy_043
Water Moccasin
Posts: 1895
BricsCAD 18
Re: fill_image in OpenDCL
«
Reply #3 on:
May 25, 2019, 04:07:05 PM »
Instead of guessing the syntax and the required type of the arguments why nor Read The Manual! Check the Help or the Control Browser. There is even a sample file (Methods.lsp).
Logged
Peter2
Swamp Rat
Posts: 654
Re: fill_image in OpenDCL
«
Reply #4 on:
May 27, 2019, 02:27:33 AM »
The help says:
Code - Auto/Visual Lisp:
[Select]
(
dcl
-
PictureBox
-
DrawLine
<
CONTROL
>
(
List
of Lists as
(
StartX
[
as Long
]
StartY
[
as Long
]
EndX
[
as Long
]
EndY
[
as Long
]
Color
[
as Color
]
)
...
)
)
So it seem that you have one list per line and you can create many lines.
And are you sure that you call the form in a right way? "C:form" looks a little bit strange for me ..
Logged
Peter
AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23
kdub_nz
Mesozoic keyThumper
SuperMod
Water Moccasin
Posts: 2153
class keyThumper<T>:ILazy<T>
Re: fill_image in OpenDCL
«
Reply #5 on:
May 27, 2019, 06:24:00 AM »
Try this :
(see attachments)
Code - Auto/Visual Lisp:
[Select]
;|*Main Entry Point*|;
(
defun
c:testpb01
(
)
;; Ensure OpenDCL Runtime is (quietly) loaded
(
setq
cmdecho
(
getvar
"CMDECHO"
)
)
(
setvar
"CMDECHO"
0
)
(
command
"_OPENDCL"
)
(
setvar
"CMDECHO"
cmdecho
)
;; Load the project
(
if
(
dcl
-
Project
-
Load
(
FindFile
"TestPB.odcl"
)
T
)
(
progn
(
setq
Result
(
dcl
-
Form
-
Show TestPB
/
Form1
)
)
;; (if (= Result 1) (DoSomething))
)
)
(
princ
)
)
;|*OpenDCL Event Handlers*|;
(
defun
c:TestPB
/
Form1
/
doit#OnClicked
(
/
)
(
dcl
-
PictureBox
-
DrawLine
TestPB
/
Form1
/
PictureBox1
'
(
(
10
10
100
50
42
)
(
10
50
100
50
2
)
)
)
(
dcl
-
PictureBox
-
DrawLine
TestPB
/
Form1
/
PictureBox1
'
(
(
10
10
230
10
248
)
(
10
20
230
20
249
)
(
10
30
230
30
250
)
(
10
40
230
40
251
)
(
10
50
230
50
252
)
(
10
60
230
60
253
)
(
10
70
230
70
254
)
(
10
80
230
80
255
)
)
)
)
added:
Just noticed the code referred to by roy ... So added the data from that too.
«
Last Edit: May 27, 2019, 06:45:56 AM by kdub
»
Logged
Called Kerry in my other life
Retired; but they dragged me back in !
I live at UTC + 13.00
---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.
mailmaverick
Bull Frog
Posts: 495
Re: fill_image in OpenDCL
«
Reply #6 on:
May 28, 2019, 12:23:28 AM »
Thanks KDUB . Perfectly Works !!!!
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
fill_image in OpenDCL