Visual LISP Inspect 工具和函数允许您显示对象的属性。vlax-dump-object 注意:AutoLISP 中的 ActiveX 支持仅限于 Windows。
可以从 AutoLISP 程序、Visual LISP 控制台窗口提示符或 AutoCAD 命令提示符调用该函数。该函数打印指定对象的属性列表并返回 。vlax-dump-objectvlax-dump-objectT 例如,以下代码获取添加到模型空间的最后一个对象,然后发出打印对象属性的问题:vlax-dump-object (setq WhatsMyLine (vla-item mSpace (- (vla-get-count mspace) 1))) #<VLA-OBJECT IAcadLWPolyline 036f1d0c> (vlax-dump-object WhatsMyLine) ; IAcadLWPolyline: AutoCAD Lightweight Polyline Interface ; Property values: ; Application (RO) = #<VLA-OBJECT IAcadApplication 00a4ae24> ; Area (RO) = 2.46556 ; Closed = 0 ; Color = 256 ; ConstantWidth = 0.0 ; Coordinate = ...Indexed contents not shown... ; Coordinates = (8.49917 7.00155 11.2996 3.73137 14.8 5.74379 ... ) ; Database (RO) = #<VLA-OBJECT IAcadDatabase 01e3da44> ; Elevation = 0.0 ; Handle (RO) = "53" ; HasExtensionDictionary (RO) = 0 ; Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 01e3d7d4> ; Layer = "0" ; Linetype = "BYLAYER" ; LinetypeGeneration = 0 ; LinetypeScale = 1.0 ; Lineweight = -1 ; Normal = (0.0 0.0 1.0) ; ObjectID (RO) = 28895576 ; ObjectName (RO) = "AcDbPolyline" ; PlotStyleName = "ByLayer" ; Thickness = 0.0 ; Visible = -1 T 您可以向其提供可选的第二个参数,该参数使它还列出适用于对象的所有方法。只需在对象名称后面指定:vlax-dump-objectT (vlax-dump-object WhatsMyLine T) 相关概念 |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 14:48
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.