OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Peter2 on January 04, 2017, 09:32:33 AM

Title: Problems with dcl-control-getproperty from forms
Post by: Peter2 on January 04, 2017, 09:32:33 AM
I have a lisp which calls a project, loops through all forms in the project and displays them. It works fine, but it crashes when it finds the tabs of a tab-strip. Any ideas to avoid it?

Code (autolisp) Select

(defun c:odcl_printscr ()
    (if projektdatei
        (setq projektdatei (getfiled "ODCL-Datei wählen" (strcat (vl-filename-directory projektdatei) "\\") "odcl" 0))
        (setq projektdatei (getfiled "ODCL-Datei wählen" "c:\\" "odcl" 0))
    )
    (setq projekt (dcl-project-load projektdatei T (vl-filename-base projektdatei)))

    ; Titelzeilen
    (setq inhalte nil inhalte (dcl-Project-GetForms projekt))
    (if (and inhalte (dos_dirp outputpfad2))
        (progn
            (foreach form inhalte
                (if (dcl-Control-GetProperty form "(Name)") ;; -->> this line will crashes when the form is a tab-strip
                    (progn
                        (setq name (dcl-Control-GetProperty form "(Name)"))
                        (dcl-form-show (eval (read (strcat projekt "/" name))))
                        (princ (strcat name ))
                    )
                )
            )
        )
    )
    (princ)
)


Title: Re: Problems with dcl-control-getproperty from forms
Post by: owenwengerd on January 04, 2017, 01:18:42 PM
Maybe the ODCL8Upd.lsp utility (http://www.opendcl.com/forum/index.php?topic=2084.msg10309#msg10309) will help?
Title: Re: Problems with dcl-control-getproperty from forms
Post by: Peter2 on January 09, 2017, 08:31:29 AM
Thanks Owen, I will take a look.