当我使用 getdynprops 函数时,我从块中得到以下结果: (("Stand" . "VisibilityState0") ("Right Arm X" . 74.0225) ("Right Arm Y" . 50.2598) ("Left Arm X " . -56.4576) ("Left Arm Y" . -17.357) ("Stand Height" . 158.5) ("Origin" 0.0 0.0))
我指定了除原点之外的所有这些。我认为这是动态块的内在属性。
编辑:这是参考代码: |
- ;; Get Dynamic Block Property Value - Lee Mac;; Returns the value of a Dynamic Block property (if present);; blk - [vla] VLA Dynamic Block Reference object;; prp - [str] Dynamic Block property name (case-insensitive)(defun LM:getdynpropvalue ( blk prp ) (setq prp (strcase prp)) (vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x))) (vlax-get x 'value))) (vlax-invoke blk 'getdynamicblockproperties) ))
|