Export ODCL to textfile?

Started by Peter2, July 24, 2013, 09:47:30 AM

Previous topic - Next topic

Peter2

Hi

is it possible to export (write, print) the definition of an ODCL to a text file? I think it could be easier to check the consistency of the wording, of the caption on so on ....

Regards

Peter
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

BazzaCAD

You can use this method:
http://www.opendcl.com/HelpFiles/index.php?page=Advanced/Tips.htm
And write the property info to a TXT file instead of writing it to a new ODCL file.
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

Peter2

#2
[Edit: I use 7.0.0.12 German]


Hi Barry

I modified it like this

Code (autolisp) Select
(defun princodcl (odclfile / project props fontsize)
  (setq project (dcl_Project_Load odclfile))
  (if (not project) (exit))
  (foreach form (dcl_Project_GetForms project)
    (foreach control (dcl_Form_GetControls form)
        (setq props (dcl_Control_GetProperties control))
        (foreach line props
          (princ "\n")
          (princ line)
        )
    ); foreach
  ); foreach
)


and started with

Code (autolisp) Select
(princodcl "test.odcl")

and got a loooooong list like

Code (autolisp) Select
....
(Control Browser)
(Custom)
BackColor
BorderStyle
BottomFromBottom
Caption
DragnDropAllowBegin
DragnDropAllowDrop
Enabled
EventInvoke
Font
ForeColor
Height
....

These are the properties, but I'm missing the values. How to get them?

Peter

Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Peter2

Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10