Recent posts

#51
Runtime/AutoLISP / Re: OpenDCL Tutorial
Last post by glfiedler - January 29, 2024, 02:43:14 PM
Thank you for that link.
#52
Runtime/AutoLISP / BlockView-PreLoad will not wor...
Last post by glfiedler - January 29, 2024, 02:34:41 PM
Greetings,
I run AutoCAD 2022 and the latest version of OpenDCL.

I have created a Modal form with listbox and blockview controls.  What I want to do is select from a list of blocks and show the block in the blockview control.  That seems really straight forward.

I have blocks in what I call a library drawing. (setq libdwg "C:\\Users\\jerry\\Drawings\\MISC_BLOCKS\\ROUTER.dwg").  The OpenDCL help (which is very good and usually helps a lot) leads me to believe that (dcl-BlockView-PreLoadDwg RouterBitsDB/Form1/BlockView1 libdwg) will allow me to show the blocks in the blockview control.

It does not work like that and I really need some ideas. The following two cases will show you what happens:

1) With libdwg OPEN and as the ACTIVE drawing and the DCL routine does NOT contain the PreLoad command the form does EXACTLY what I want.  That is, I click on an item in the list and the block is shown.

2) With libdwg CLOSED and another drawing active and the DCL routine DOES contain the PreLoad command the form opens and the listbox works fine but nothing is displayed in the blockview control.

I am obviously doing something wrong and my knowledge of OpenDCL is limited.  Although I have been programming for decades I have only just started to learn OpenDCL.
Reviewing the two tests, above, it would appear that I am calling out the library drawing incorrectly and it is simply defaulting to the active drawing.

Thank you for taking the time to read this post.
Regards,
Jerry
#53
Studio/Dialog Editor / Re: dcl-Grid-setCelltext with ...
Last post by Peter2 - January 29, 2024, 09:59:45 AM
I found it ...

The Grid was totally empty, and I have to use some "ADD" commands to build the table before I can "SET" something ..
#54
Studio/Dialog Editor / dcl-Grid-setCelltext with no r...
Last post by Peter2 - January 29, 2024, 09:49:55 AM
With the open dialogue I tried this code:

Befehl: (dcl-Grid-GetCellStyle xdata_selector/xdata_selector/grid_single 1 1)
-1

Befehl: (dcl-Grid-SetCellStyle xdata_selector/xdata_selector/grid_single 1 1 6)
T

Befehl: (dcl-Grid-GetCellStyle xdata_selector/xdata_selector/grid_single 1 1)
6

Befehl: (dcl-Grid-setCelltext xdata_selector/xdata_selector/grid_single 1 1 "a")
nil

Befehl: (dcl-Grid-getCelltext xdata_selector/xdata_selector/grid_single 1 1)
""

I don't know why I can not set a text to my grid...
Any ideas?
#55
Studio/Dialog Editor / Re: Set Lisp Symbol Names and ...
Last post by Jim Short - January 29, 2024, 07:32:20 AM
Quote from: Fred Tomke on June 12, 2009, 04:45:03 AM
QuoteFred, do you mean there is a function that will return a control based on its name?

Kelie, no, I don't mean this. I mean, when I'm painting my form and I'm coding at the same time then I want to have the VarName in clipboard to add additional (accessing) lines in my source code files. At this time I call "Set Lisp Symbol Names" at first to copy the VarName value from the property's pane into my lisp file. In most of the cases I have the needed dcl_control_...-functions in mind and then I paste the VarName into the VLISP editor. The "nice-to-have" I mean is a command in the context menu that the VarName of the currently selected control or form can be copied as text into clipboard to fasten the coding process and to avoid that the VarName property must be filled before.

I hope it was a little understandable.
Fred

Fred, Can you please explain how this works: At this time I call "Set Lisp Symbol Names"
#56
Runtime/AutoLISP / Re: OpenDCL Tutorial
Last post by TCNTRM - January 28, 2024, 10:52:20 PM
That link doesn't work for some time, here is where I found it when I started with OpenDCL

https://pdfcoffee.com/opendcl-tutorial-novo-pdf-free.html

EDIT: also with dcl commands, use "-" not "_" like in this tutorial, this was changed with newer versions. Also you can see this in ODCL editor but just to point that out so you don't get errors
#57
Runtime/AutoLISP / OpenDCL Tutorial
Last post by power_factor - January 27, 2024, 04:43:48 AM
Hi everyone! Can someone share OpenDCL Tutorial please? Link on the site don't works.
#58
Runtime/AutoLISP / Re: what is the purpose of dcl...
Last post by owenwengerd - January 26, 2024, 06:33:06 PM
Take a look at the Combo Box Lab sample to see one solution.
#59
Runtime/AutoLISP / dcl-control-insert and dcl-con...
Last post by domenicomaria - January 26, 2024, 06:11:06 AM
it would be very interesting if there were commands like:
dcl-control-insert and dcl-control-delete ...

... because we could create run-time dialogues
and develop a lisp application that creates dialogues "automatically"
to help those who don't know how to use OpenDCL
...
#60
Runtime/AutoLISP / what is the purpose of dcl-Con...
Last post by domenicomaria - January 26, 2024, 06:09:11 AM
dcl-Control-SetComboBoxStyle does NOT WORK at RUN TIME
. . .
the STYLE of the combo-box is not changed !
. . .
what is the purpose of dcl-Control-SetComboBoxStyle ?

. . .