Hi all,
I have a question about displaying long lists of data from Autolisp in AutoCAD 2014. I have a function that Lee Mac helped me develop a while back to read dynamic block settings details and report them to the text window. My dynamic blocks have a large amount of data, sometimes having 30 properties to report. The function cycles through the various dynamic block parameters and lists their current settings as well as the allowed settings and other nuggets as well. One problem I am trying to come up with is how to get the text screen to come up automatically like it did in AutoCAD 2011. I can get it to come up in AutoCAD 2014 if I hit ctl+F2, but I could use it to come up automatically again as it did in AutoCAD 2011. Does anyone know if this can be done like it used to work with (textscr)?
Additionally, I would love to have this at least take me to the top of the list - it always displayed the screen at the end of the list and users have to scroll from the bottom of the data upwards.
;;;from Lee Mac on the Autodesk forums as a reply to my question
;;;modified by Rapidcad 12-20-11 for TGW
;;;to just display dumps from properties we want to see
(defun c:dbinfo ( / ent obj props )
(vl-load-com)
(if
(and
(setq ent (car (entsel "\nSelect Dynamic Block: ")))
(eq "AcDbBlockReference" (vla-get-objectname (setq obj (vlax-ename->vla-object ent))))
(eq :vlax-true (vla-get-isdynamicblock obj))
)
(progn
(setq props
(vl-remove-if
(function
(lambda ( prop )
(setq prop (strcase (vla-get-propertyname prop)))
(or
(eq "ORIGIN" prop)
(eq "POSITION" (substr prop 1 8))
)
)
)
(vlax-safearray->list
(vlax-variant-value (vla-getdynamicblockproperties obj))
)
)
)
(mapcar 'vlax-dump-object props)
(princ)(textscr) )
(alert "\n You'll need to pick again - please select a DYNAMIC block.")
)
)
Thanks in advance..
Ron