Recent Posts

Pages: 1 2 [3] 4 5 ... 10
Runtime/AutoLISP / Re: OnKeyUp event
« Last post by Fred Tomke on October 25, 2023, 06:40:32 AM »
That means, you have a solution now?
Runtime/AutoLISP / Re: OnKeyUp event
« Last post by Dovys on October 25, 2023, 06:14:49 AM »
yes, I know here are more events on key press.
I have tested you code (attached image). In window you can see 6 events.
1) Shift key Down.
2) @ key Down.
3) Shift key Up.
4) @ key Up.
5) 2 key Down.
6) 2 key Up.

And in Input you can see @2
shift key Char is unknown and ASCII is 16, but in case of @ and 2 both are Char 2 and ASCII 50. This means it is not possible to get @ symbol (and all other symbols in this button row on keyboard) in lisp.
Input text box have symbol @ but lisp have events of two key presses.

Writing this messages I got how can I get it. All I need from key up event is only even itself, but I don't need Character variable, I just need to read content of text box.
In my code only one letter can be entered in text box and this letter needs to be in hard coded list and not be in list of already entered letters.

Thanks for help.
Runtime/AutoLISP / Re: OnKeyUp event
« Last post by Fred Tomke on October 25, 2023, 01:31:12 AM »
Hi, I'm not sure if you know that many events will be fired for a single @-char?
I attached a small example for demonstration. I hope I'm on the right path, sorry if not.
With regards, Fred
Runtime/AutoLISP / Re: OnKeyUp event
« Last post by Dovys on October 24, 2023, 10:35:56 PM »
I don't understand if we talk about same thing so I will try to explain in more details.

I use Visual Studio Code as my IDE. I have run lisp with OpenDCL in debug mode from VSC.
After I open GUI made with OpenDCL in AutoCAD and enter symbol into text box I see @ but in VSC variable "Character" is 2

Code: [Select]
(defun c:Savartos/Main/TBGNew#OnKeyUp (Character RepeatCount Flags /)
Because of this if I want to check if symbol @ was entered I don't know how, because in lisp I only see number 2. I have attached image.
Runtime/AutoLISP / Re: OnKeyUp event
« Last post by Fred Tomke on October 24, 2023, 01:57:32 PM »
Hi, that depends on the keys you need to input @ character. For the German keyboard layout I need to press AltGr to get @ sign. So the numer 2 and 4 are the key codes for the additional key.
I hope it was understandable.
With regards, Fred
Runtime/AutoLISP / OnKeyUp event
« Last post by Dovys on October 24, 2023, 12:40:13 PM »
I am trying to use OnKeyUp event on TextBox, it works if I use letter buttons, but if I try to use buttons above letter buttons like button "@" in text box I see symbol "@", but function KeyUp gives me number "2" in variable Character.
I try to get non English letters from this buttons after I set Keyboard layout to my language and here are some letters on buttons "@", "$" and so on.
Like button "@" have letter "Č" and button "$" have letter "Ė". But I only get number 2 or 4.
Runtime/AutoLISP / textbox not updating
« Last post by Domzinator on October 20, 2023, 02:10:20 PM »
Hi Guys i am trying to update a textbox when the form iInitializes but this does not seem to work i cant understand why. Here is my code:

Code: [Select]
(setq txt "This is a test")
(defun c:MyCivil3D/Form1#OnInitialize (/)
(dcl-Control-SetText MyCivil3D/Form1/TextBox1 txt)
Runtime/AutoLISP / Re: OpenDCL AutoCad LT 2024
« Last post by Joseph on September 30, 2023, 01:59:59 AM »
Indeed, you are right.
I did not know about this.
The LT has lisp limitations:

The first type of limitation is the lack of support for external ActiveX objects. For them you cannot use the (vlax-create-object), (vlax-get-object), (vlax-get-or-create-object), (vlax-import-type-library), (vla-GetInterfaceObject) functions. These functions are typically used for online communication, clipboard handling, XML, binary files, Excel, Word, Access (or other database tools), etc.

E.g the call:

(vlax-create-object "Microsoft.XMLHTTP")

returns nil and the web "communicator" object is not created.

Another, quite logical limitation is working with 3D DWG objects (plus render tools, databases...). These are not supported in LT version and therefore you cannot use (command) to call unsupported commands (or access variables), nor can you create or modify 3D objects via (entmake), (entmakex), (entmod).

E.g. the construction:

(entmake (list (cons 0 "3DFACE")(cons 10 (car triangle))(cons 11 (cadr triangle))(cons 12 (caddr triangle))(cons 13 (caddr triangle))))

returns nil and the entity of type 3DFACE is not created (silent fail, no error is reported).

You cannot access XRecords, used by some LISP applications to store data in dictionaries.

You also can't use Express Tools commands or its libraries or "acet-" functions in LT. Of course, you can't call VBA or ARX or .NET functions either.

Automatic loading of LISP functions from ACADDOC.LSP must be done in the LT version in the ACADLTDOC.LSP file. Also, .MNL files (with CUIx menu files) are not automatically loaded. The LT version does not work with profiles. And there is no AI_UTILS.LSP preinstalled.

Note that the LT version does not have a LISP editor (IDE, the VLIDE command) and therefore no debugger or compiler or linker. You can switch Unicode support though - LISPSYS. You cannot use (vlisp-compile) to compile LSP files either.

You can use the .bundle autoload mechanism in LT (the folder Autodesk/ApplicationPlugins). Don't forget to add Platform="ACADLT" to the RuntimeRequirements section in your PackageContents.xml file.

The AutoCAD LT for Mac version has other limitations - e.g. you cannot use ActiveX functions (vlax-), reactors, etc.
Runtime/AutoLISP / Re: OpenDCL AutoCad LT 2024
« Last post by Christina on September 29, 2023, 03:06:13 PM »
Joseph, search about 2024...
Runtime/AutoLISP / Re: OpenDCL AutoCad LT 2024
« Last post by Joseph on September 29, 2023, 04:25:51 AM »
AutoCAD LT does not support lisp,vba,arx,.net, etc.
Pages: 1 2 [3] 4 5 ... 10