Problems with AUBlockTool.lsp and BC11

Started by roy_043, May 03, 2011, 01:55:03 AM

Previous topic - Next topic

roy_043

Hello everybody,

I'm just starting out with OpenDCL (6.0.2.3) and have been reading the tutorial by Barry Ralphs. I can't get the palette form of the second lesson to display properly in Bricscad (11.2.12). I have already tried the files in the "Final" folder with the same result: none of the controls are visible in the form. _MasterDemo.lsp (also containing a palette form) works fine however. What is going wrong?

Regards, Roy.

Edit: both AUBlockTool_Final.lsp and AUBlockTool.odcl are in the search path.
Edit2: removed final from the subject header

owenwengerd

Palette forms are not yet working correctly in Bricscad. I probably should revisit palettes in Bricscad to see if there is any way to improve their operation, but I believe the problems are in the Bricscad code, not in the OpenDCL code. Control bars are working pretty well in the latest versions of Bricscad.  If you're brave, you could copy and paste all the controls from the palette onto a new control bar form, then delete the palette and rename the control bar to the palette's name, and this would probably work in Bricscad without any changes in the lisp code.
Owen Wengerd (Outside The Box) / ManuSoft

roy_043

Thank you Owen. I will follow your advice and create a control bar form. I now see that _MasterDemo.lsp also uses this form type.

roy_043

#3
Hello everybody,

Halfway through the AUBlockTool tutorial I am hitting a few snags. As advised by Owen I am using a Control Bar instead of a Palette.
1.
I was playing around with the Min Height and the Min Width of the Control Bar (this is not in the tutorial) and I notice that these sizes are not respected if the Control Bar is undocked.
2.
After starting the command with AUBT, using:
(dcl_Control_GetValue AUBlockTool_PalBlkTool_SliderBarXScale)
before that slider has been moved returns 0 even though the Min Value of the slider is 1.
3.
Moving the scale sliders causes multiple lines like this one:
(c:AUBlockTool_PalBlkTool_SliderBarXScale_OnScroll 2)
to be entered in the BC Scroll History.
4.
Using the Multi Insert button I cannot insert a block. Replacing the insert command with a simple:
(command "_redraw")
also doesn't work. It seems there is a focus issue underlying this problem.

Regards, Roy.

roy_043

Quote from: roy_043 on May 04, 2011, 04:32:18 AM
4.
Using the Multi Insert button I cannot insert a block. Replacing the insert command with a simple:
(command "_redraw")
also doesn't work. It seems there is a focus issue underlying this problem.
My mistake entirely: I failed to change Event Invoke to 1 for this button.

roy_043

Some additional issues:
5.
Control Bar resizing issue (the Control Bar has a Min Width and is docked on the left side of the screen):
5a.
After some playing around with the width of the Control Bar you can drag the "resize bar" to a position that is well within the Min Width (the Control Bar does not become smaller than the Min Width).
5b.
After the previous action to make the Control Bar a few pixels wider you have to move the "resize bar" much further to the right than those few pixels.
6.
If you close BC while the Control Bar is open you get a crash_report.txt. I have tried to solve this by using the OnEnteringNoDocState event and this function:

(defun c:AUBlockTool_PalBlkTool_OnEnteringNoDocState (/)
  (dcl_Form_Close AUBlockTool_PalBlkTool)
)

but this also results in a crash_report.txt as well as a brx_log.txt.
7.
I notice (after changing c:AUBlockTool_PalBlkTool_OnInitialize) that a ListBox will retain its content when a dialog is redisplayed but not its CurSel.
8.
Contrary to the OpenDCL Help ListBox_GetCurSel returns nil if there is no selection. This is not a big problem of course:
(< nil 0) ; => T