Recent posts

#11
Runtime/AutoLISP / Re: Can anyone provide an exam...
Last post by owenwengerd - August 05, 2025, 07:10:12 PM
The Grid sample (in the language/Samples subfolder of your OpenDCL Studio installation) uses an image list.
#12
Runtime/AutoLISP / Can anyone provide an example ...
Last post by sysuwzx - August 05, 2025, 02:19:28 AM
Hello, recently I come across the problem about Image List in OpenDCL.
In OpenDCL help, Image List is defined with " Image lists are Windows system objects for holding an ordered list of icons, and they are represented by handles in Windows. OpenDCL encodes image list handles as entity names when returning them to AutoLISP. These values are not really entity names, but they can be passed to OpenDCL functions that expect an image list, and OpenDCL will interpret them correctly as image list handles. Use the Image List methods to manage image lists."

Can anyone provide an example of the usage of Image List in Grid Control? I have search the internet and found nothing about it, and i search with the popular ai search engineer and the ai-generated code did not work.

Thanks in advance~
#13
Deployment / Re: Support OpenDCL for Gstarc...
Last post by owenwengerd - August 04, 2025, 04:48:27 PM
Thanks, I also found it at a different GstarCAD distributor site. Support for GstarCAD 2026 is included in 9.3.1.1.
#14
Deployment / Re: Support OpenDCL for Gstarc...
Last post by Marcin - August 04, 2025, 01:22:06 AM
Hello. We have link to new sdk from Gstarcad:

www.gstarcad.pl/ftp/2026/GRX/GstarCAD2026_grxsdk_250625.zip

#15
Runtime/AutoLISP / Re: Dialog start position
Last post by owenwengerd - August 01, 2025, 10:33:33 AM
In the C Windows API it is possible to get coordinates of UL and LR corner of each display. I wouldn't be surprised if there was some Windows COM API that could retrieve that same information, but I've never looked for such a thing myself.
#16
Runtime/AutoLISP / Re: Dialog start position
Last post by DW - July 31, 2025, 09:32:23 PM
Hi Fred,
I had the same problem with screen size / resolution changes. I use a function called during the initalisation of every form...

So in the OnInitialize function:

;; Make form visible if monitor size changes
    (setq sz (dcl-GetScreenSize)
         px (get_ODCL_pos "pm/edit" "TopLeftX")
    py (get_ODCL_pos "pm/edit" "TopLeftY")
    )
    (if (or (< (car sz) px)(< (cadr sz) py))
      (dcl-Form-Center (vl-doc-ref 'pm/edit))
    )

;; ================================================================
;; Function:    dpiSF
;; Purpose:     Get DPI scaling factor for display adjustments (cached)
;; Parameters:  None
;; Returns:     Float - DPI scaling factor (1.0 for 96 DPI, proportional for others)
;; ================================================================
(defun dpiSF (/ res)
  (or
    ;; Return cached value if already calculated
    *dpiSF*
    ;; Otherwise calculate and cache the scaling factor
    (and
      ;; Read current DPI setting from Windows registry
      (setq res (vl-registry-read
                  "HKEY_CURRENT_USER\\Control Panel\\Desktop\\WindowMetrics"
                  "AppliedDPI"))
      ;; Calculate scaling factor: 96 DPI = 1.0 scale
      (if (< 96 res)
        ;; For higher DPI, scale down (96/current_dpi)
        (setq *dpiSF* (/ 96.0 res))
        ;; For 96 DPI or lower, use 1.0 (no scaling)
        (setq *dpiSF* 1.0)
      )
    )
  )
  ;; Return the scaling factor
  *dpiSF*
)


;; ================================================================
;; Function:    get_ODCL_pos
;; Purpose:     Retrieve OpenDCL dialog position from registry with DPI scaling
;; Parameters:  dlg - Dialog name/identifier string
;;              pos - Position parameter name (e.g., "Left", "Top")
;; Returns:     Scaled position value (integer) or default value 200
;; ================================================================
(defun get_ODCL_pos (dlg pos / val)
  (if
    ;; Attempt to read position value from registry
    (setq val
      (vl-registry-read
        (strcat "HKEY_CURRENT_USER\\"
                (vlax-product-key)
                "\\Profiles\\"
                (getActiveProfile)
                "\\OpenDCL\\Dialogs\\"
                dlg)
        pos
      )
    )
    ;; If registry value found, scale by DPI factor
    (* (dpiSF) val)
    ;; Default position if registry read fails
    200
  )
)
#17
Runtime/AutoLISP / Dialog start position
Last post by Fred Tomke - July 29, 2025, 02:16:06 AM
Hello,

when I close the form, the latest position is stored in the registry to make sure to reshow it on the latest position before closing.

(vl-registry-read (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" (getvar "CPROFILE") "\\OpenDCL\\Dialogs\\<projectname/formname>") "TopLeftX")
It works fine on a workstation with a never changing screen configuration with 0,0 at the leftmost screen.

In former times - when I was young and unexperienced - I tried to make sure that the form will appear on a place within the visible monitor area. I couldn't image that form positions could be negative values.

In the meantime a customer told me that she cannot see the (modeless) dialog although it is open. A research for the reason ended up with the result in exactly the position-overriding in my former code: start the form at x=30 and y=30 when the last form position is obviously outside the visible monitor area. But infact x=30 and y=30 is outside for this customer. Less than 0 for x and more than 1980 for x is actually visible.

Is the any chance to retreive minx miny maxx maxy for each accessible screen and not only screensize?

I hope I was understandable.
With regards, Fred
#18
Deployment / Re: Support OpenDCL for Gstarc...
Last post by Joseph - July 26, 2025, 05:27:38 AM
Try one of these emails:

Marketing : info@gstarcad.net
Sales : sales@gstarcad.net
Support : support@gstarcad.net
#19
Deployment / Re: Support OpenDCL for Gstarc...
Last post by owenwengerd - July 25, 2025, 08:19:18 PM
Please ask someone from GstarCAD to contact me by email to work out how I can get the SDK. I don't want to violate any copyright
#20
Deployment / Re: Support OpenDCL for Gstarc...
Last post by Joseph - July 24, 2025, 09:23:24 PM
Don't know. The reseller sent me the download link for the SDK. But anyone who make an account on gstarcad website can download the SDK from this link https://www.gstarcad.net/download/. If you downloaded from https://filebin.net/58wta6agdxvdf30k you can delete it from there.