Using entget is possible but ActiveX properties is much easier.
Here are two routines that help you understand how to get and put the COM linetypescale property.
notice the (vl-load-com) as the last line. It loads activex functions.
The errortrap wrapper on the activex call just protects the function from errors. Returns T or value for success and nil for failure.
P=
Code:
;___________________________________________________________________________________________________________|
;
; Written By: Peter Jamtgaard C.E., P.E., S.E. copyright 2020 All Rights Reserved
;___________________________________________________________________________________________________________|
;
; Abstract: These command line functions allow a user to select an object and get the linetypescale property
; or change the linetypescale property after entering the new value.
; (These functions are easily changed to modify other activex properties.)
;___________________________________________________________________________________________________________|
;___________________________________________________________________________________________________________|
;
; Comand line function list
;___________________________________________________________________________________________________________|
;* C:LTS
;* Command line function to get and return a linetype scale on a selected object
;* C:LinetypeScale
;* Command line function to get and return a linetype scale on a selected object
;* C:LTSP
;* Command line function to change a linetype scale on a selected object
;* C:LinetypeScalePut
;* Command line function to change a linetype scale on a selected object
;___________________________________________________________________________________________________________|
;
; General function list
;___________________________________________________________________________________________________________|
;* (ErrorTrap symFunction)
;* General error trap function
;$ EndHeader
;___________________________________________________________________________________________________________|
;___________________________________________________________________________________________________________
;
; Command line function to get and return a linetype scale on a selected object
;___________________________________________________________________________________________________________
(defun C:LTS ()(C:LinetypeScale))
(defun C:LinetypeScale (/ entSelection lstSelection objSelection)
(if (and (princ "\nSelect object to get linetype scale: \n")
(setq lstSelection (entsel))
(setq entSelection (car lstSelection))
(setq objSelection (vlax-ename->vla-object entSelection))
)
(errortrap '(vla-get-linetypescale objSelection))
)
)
;___________________________________________________________________________________________________________
;
; Command line function to change a linetype scale on a selected object
;___________________________________________________________________________________________________________
(defun C:LTSP ()(C:LinetypeScalePut))
(defun C:LinetypeScalePut (/ entSelection lstSelection objSelection sngLinetypeScale)
(if (and (princ "\nSelect object to put linetype scale: \n")
(setq lstSelection (entsel))
(setq entSelection (car lstSelection))
(setq objSelection (vlax-ename->vla-object entSelection))
(setq sngLinetypeScale (getdist "\nEnter Linetype Scale: "))
)
(errortrap '(vla-put-linetypescale objSelection sngLinetypeScale))
)
)
;___________________________________________________________________________________________________________
;
; General error trap function
;___________________________________________________________________________________________________________
(defun ErrorTrap (symFunction / objError result)
(if (not
(vl-catch-all-error-p
(setq objError (vl-catch-all-apply
'(lambda (X)(set X (eval symFunction)))
(list 'result)))))
(if result result 'T)
)
)
(vl-load-com)