Frequently asked questions
Many programmers emailed us with questions of how to accomplish certain programming tasks. Bellow are links that will provide answers to some of the questions we have received so far.
More questions and answers will be uploaded to this web site as they become available. If you have any programming questions not answered here please feel free to email our technical support team and we will respond to you directly, and post your question here as time permits.
Questions about Unexpected Situations
Here is the list of actual questions listed by topic:
- VLX and Separate Name Space Problem
I can't get my method to be activated from a compiled VLX using the separate name space argument, yet I can with a .lsp or a .fas file. - AutoCAD® runs in Single Document Interface (SDI) mode
The VarNames return a NIL once I switch to a new drawing in SDI mode. The OnDocActivated Event does not work in SDI mode for Modeless and Dockable forms. - Standard DCL -> ObjectDCL functions
Can a control be set to a value (similar to the set_tile function)? - AutoCAD® runs in Multiple Document Interface (MDI) mode
Do you have any examples of adapting to Multi Document Interface (MDI)? - Stack overflow by opening too many nested dialogs
I have a series of dialog boxes and after I activate a few of them, one from another, from another, etc. The dialog boxes will no longer close after several have been activated, why? - Closed modeless dialog seen as active
Hi I am closing a Modal dialog box using Odcl_Form_Close, then calling Odcl_Form_IsActive right after. The problem is that Odcl_Form_IsActive is telling me the dialog box I am closing is still active. Why? - Closed modeless dialog and chprop command
Hi I am closing a Modal dialog box using Odcl_Form_Close, then using the AutoLisp 'command' function to activate the AutoCAD command chprop. The problem is that it will not activate the chprop command. - AutoCAD Startup Problem
Defun-q S::STARTUP and dialog box initialization problem.
Questions about Properties and Fonts
Here is the list of actual questions listed by topic:
- Setting properties at runtime
Is it possible change some control's properties at run time? - Font selection dialog
Do you have an example that of a font selection dialog box? - Font selection dialog
I am having some problems with a dialog box, every indication is that the dialog box is created because Odcl_Form_IsActive returns true, but it does not appear on screen. I did a SaveAs and changed the project name and the box started working. Then it quit appearing again. - ActiveX control colors
How do I set colors of an ActiveX control? - ActiveX control pictures
How do I set pictures in an ActiveX control? - Setting FilterStyle
I tried to change the FilterStyle property of a TextBox at run-time, but it did not update the control, why?
Questions about ActiveX controls
Here is the list of actual questions listed by topic:
- Microsoft Image Combo Box ActiveX control
How do I program the Microsoft Image Combo Box ActiveX control? - ActiveX control colors
How do I set colors of an ActiveX control? - ActiveX control pictures
How do I set pictures in an ActiveX control?
Questions about Controls and Editing
Here is the list of actual questions listed by topic:
- Types of comboboxes
Where are, In the Tool Box, the controls that are shown in the example (e.g. Arrow HeadComboBox, LineWeight ComboBox, Color ComboBox, PlotStyle ComboBox, etc.) ? - Tree controls and image lists
In the TreeControl I am finding that Icons and Bitmaps with an area painted grey is being painted as white why? - Picture box at run time
Is it possible change the picture property in a picture box at run time? - Picture box and vector_image
Is it possible to use vector_image or an equivalent function? - Adding rows to a list view
Can Odcl_ListView_AddRow be modified so that I can have an option to insert any where in the table and not at the default end of table? - Selecting an item in list views
Why can't the method "Odcl_ListView_SetCurSel" highlight the item I wanted to select in my ListView control in a Modeless dialog box. - Selecting items in list views having no effect
Is there a way for a program to cause the selection of several rows in a ListView, which has multiple-selection and FullRowSelect enabled? I was surprised when I couldn't find a function (method) to do this. I tried multiple calls to SetCurSel and nothing happened. The list view is in the Report style. - ReturnPressed for multi-line text boxes
For some reason the 'ReturnPressed' event is not allowed in Multi-line TextBox control. Why is that? - Return key and text boxes
I believe I have found a bug, when the focus is on a TextBox control and I press "Enter" the form will be closed immediately. It means that when I have entered something into a textbox and press "Enter" the focus will not move the next control but close the form. - Return key and text boxes
I believe I have found a bug in AutoCAD R14 ObjectDCl. When TextBox control has focus and I press "Enter" and I have the ReturnPressed event setup to receive andact on it, so as the form will not close. In my ReturnPressed function I call Odcl_Control_SetFocus to force the focus to shift to another control, the command line retains the focus instead, Why? - Tree controls and large lists
I found the tree control is too slow when I have loaded a large number of entries (1000 - 2000). It can take half a minute to end a drawing when the tree has such a large number of entries, why?
Knowledge Base
FAQ