Recent posts

#71
Runtime/AutoLISP / Re: Run command with enter key
Last post by owenwengerd - March 29, 2024, 06:54:40 PM
I suppose the error occurs because the sent string does not execute until after the modal dialog is closed. Try this, it might work better:
(c:FindMS/Form1/TextButton1#OnClicked)
#72
Runtime/AutoLISP / Run command with enter key
Last post by dsm_dude - March 27, 2024, 05:30:24 AM
I cant seem to figure out why the enter button gives me this error

Error: NIL value not allowed
Function: dcl-Control-GetText
Argument: 0

Below is my lisp:
(defun c:FINDMS (/ *error*)
  (command "OPENDCL")
  (dcl_Project_Load "FindMS" T)
  (dcl_Form_Show FindMS_Form1)
  (princ)
  )


;; Error Trap
  (defun *error* ( msg )
    (if (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
      (princ (strcat "\nError: " msg))
      );if
    (princ)
    );error


;; Start Dialog box
(defun c:FindMS/Form1#OnInitialize (/)
  (if (not MS#)
    (setq MS# "")
    );if
  (if (not uOpt)
    (setq uOpt 1)
    );if 
  (dcl-Control-SetText FindMS/Form1/TextBox1 MS#)
  (dcl-OptionList-SetCurSel FindMS/Form1/OptionList1 uOpt)
)


;; OK Button
(defun c:FindMS/Form1/TextButton1#OnClicked (/)
  (setq MS# (dcl-Control-GetText FindMS/Form1/TextBox1)
uOpt (dcl-OptionList-GetCurSel FindMS/Form1/OptionList1)
);setq
  (command "_UnisolateObjects")
  (if (tblsearch "Layer" MS#)
    (if (setq SS (ssget "_X" (list (cons 8 MS#))))
(command "Zoom" "_object" SS "")
(alert (strcat "No Objects assigned to " MS#))
);if
      (alert (strcat MS# " Not Found!"))
      );if
  (UserOption) ;; Option Button
  (princ)
  );defun


;; Cancel Button
(defun c:FindMS/Form1/TextButton2#OnClicked (/)
  (dcl_Form_Close FindMS_Form1)
)


;; Isloate Option
(defun UserOption (/)
  (cond
    ((= uOpt 0)(command "_IsolateObjects" "P" ""))
    ((= uOpt 1)(command "_UnisolateObjects"))
    );cond
  )


;; Run command with retrun key
(defun c:FindMS/Form1/TextBox1#OnReturnPressed (/)
  (dcl-sendstring "FindMS/Form1/TextButton1#OnClicked\r")
)


;; Keep dialog open when pressing return
(defun c:FindMS/Form1#OnCancelClose (Reason /)
  (/= intIsESC 1)
)
#73
Runtime/AutoLISP / Re: REMOVE ByLayer and ByBlo...
Last post by domenicomaria - March 21, 2024, 12:22:29 AM
Yes

I can remove byBlock and ByLayer

but when I choose "select color"

immediately after
byBlock and ByLayer
are automatically added to the list again
#74
Runtime/AutoLISP / Re: REMOVE ByLayer and ByBlo...
Last post by owenwengerd - March 19, 2024, 01:00:03 PM
The color combo is implemented by the host app, so its behavior is not necessarily controlled by OpenDCL. However, I just checked a color combo box with the Combo Box Lab sample, and there I am able to delete the ByBlock and ByLayer list items in both BricsCAD V24 and Acad 2024.
#75
Runtime/AutoLISP / REMOVE ByLayer and ByBlock ...
Last post by domenicomaria - March 17, 2024, 11:57:28 PM
;         -         -         -         -         -         -         -         -         -         -         -
(defun :DCL-COMBOBOX-COLOR-INIT (prj-name frm-name ctrl-key col-no bylyr-byblk / col-pos 0-clr-nth 256-clr-nth )
   
   (if(not bylyr-byblk)
      (progn
         (if(setq 0-clr-nth   (dcl-ComboBox-FindColor prj-name frm-name ctrl-key 0   ) )
            (dcl-combobox-deleteitem prj-name frm-name ctrl-key 0-clr-nth   )
         )
         (if(setq 256-clr-nth (dcl-ComboBox-FindColor prj-name frm-name ctrl-key 256 ) )
            (dcl-combobox-deleteitem prj-name frm-name ctrl-key 256-clr-nth )
         )
      )
   )
   
   (if(not (setq col-pos (dcl-ComboBox-FindColor prj-name frm-name ctrl-key col-no) ) )
      (progn
         (dcl-ComboBox-AddColor    prj-name frm-name ctrl-key col-no )
         (setq col-pos (dcl-ComboBox-FindColor prj-name frm-name ctrl-key col-no) )
      )
   )
   (dcl-combobox-setcursel prj-name frm-name ctrl-key col-pos )
)


I want REMOVE ByLayer and ByBlock items from the COLOR COMBO BOX

dcl-combobox-deleteitem returns T but doesnt remove anything !

where am I wrong ?

#76
Studio/Dialog Editor / Re: OpenDCL STUDIO Not Opening...
Last post by omergenos - March 15, 2024, 06:05:07 AM
UPDATE

I tried to create a new user on windows and Studio works on this user perfectly. What can be the problem?

UPDATE 2 (SOLUTION)

Hey everyone,

I've been troubleshooting an issue with OpenDCL Studio not working properly on my MSI laptop, and I finally found the culprit: Nahimic2. For those who aren't familiar, Nahimic2 is a sound enhancement software that comes pre-installed on many MSI laptops.

It turns out that whenever Nahimic2 is running in the background, OpenDCL Studio refuses to start up. After performing a clean boot and systematically testing each application, I confirmed that Nahimic2 was indeed causing the conflict. If anyone else is experiencing a similar issue, I recommend trying these steps to see if they help.
#77
Studio/Dialog Editor / OpenDCL STUDIO Not Opening but...
Last post by omergenos - March 15, 2024, 03:50:59 AM
Despite appearing as a running process in the Task Manager, the OpenDCL Studio application does not launch properly, and no window opens. Runtime works successfully through AutoCad. But i need to use the Studio for designing interfaces but Studio doesn't open. 

I have attempted the following troubleshooting steps:

*Restarting my computer.
*Completely uninstalling and reinstalling OpenDCL Studio (i tried both stable and developer versions. 9.1.5.2 and 9.2.1.5)
*Checking for any invisible windows using shortcut keys like "Alt + Tab" or "Windows + D".
*Verifying my screen resolution is suitable for the application.
*Ensuring my graphics drivers are up to date.

Unfortunately, none of these steps have resolved the issue.

Could someone please provide further assistance or guidance on how to resolve this problem? If there are any specific logs or diagnostic information I can provide to assist in troubleshooting, please let me know.
#78
Runtime/AutoLISP / Re: MOVE (drag&drop) an item f...
Last post by domenicomaria - March 15, 2024, 02:28:58 AM
I tried your sample TREE.lsp
also in acad2024
and it is not possible using drag&drop
to MOVE an item from a tree control to another
and in the same tree, from a position to another ...

#79
Runtime/AutoLISP / Re: MOVE (drag&drop) an item f...
Last post by owenwengerd - March 14, 2024, 09:05:56 PM
It is working fine for me in BricsCAD V24. I don't know why it isn't working for you.
#80
Runtime/AutoLISP / Re: MOVE (drag&drop) an item f...
Last post by domenicomaria - March 14, 2024, 01:30:39 AM
Quote from: owenwengerd on March 13, 2024, 09:18:16 PMI believe the Drag N Drop sample shows drag/drop in a single tree control, and also between tree and list controls.

Thanks for the reply.

But with drag&drop I can't MOVE an element from one TREE control to another

And I can't even MOVE an item from one location to another in the same control.