0 Members and 1 Guest are viewing this topic.
(vl-load-com)(defun c:test () (setq p (getPositionMarkerCoords)) (command "zoom" "center" (getPositionMarkerCoords) "200000") (princ) )(defun getPositionMarkerCoords ( / ad s ds ts rp le ln p) (setq ad (_GetAeccDocument)) (setq s (vlax-get-property ad 'Settings)) (setq ds (vlax-get-property s 'DrawingSettings)) (setq ts (vlax-get-property ds 'TransformationSettings)) (setq rp (vlax-get-property ts 'ReferencePoint)) (setq le (vlax-get-property rp 'LocalEasting)) (setq ln (vlax-get-property rp 'LocalNorthing)) (setq p (list le ln)) )
test ; error: no function definition: _GETAECCDOCUMENT
(vl-load-com)(defun _GetAeccDocument () (setq C3D (strcat "HKEY_LOCAL_MACHINE\\" (if vlax-user-product-key (vlax-user-product-key) (vlax-product-key) ) ) C3D (vl-registry-read C3D "Release") C3D (substr C3D 1 (vl-string-search "." C3D (+ (vl-string-search "." C3D) 1))) C3D (vla-getinterfaceobject (vlax-get-acad-object) (strcat "AeccXUiLand.AeccApplication." C3D))) (vlax-get-property C3D 'ActiveDocument) )(defun getPositionMarkerCoords ( / ad s ds ts rp le ln p) (setq ad (_GetAeccDocument)) (setq s (vlax-get-property ad 'Settings)) (setq ds (vlax-get-property s 'DrawingSettings)) (setq ts (vlax-get-property ds 'TransformationSettings)) (setq rp (vlax-get-property ts 'ReferencePoint)) (setq le (vlax-get-property rp 'LocalEasting)) (setq ln (vlax-get-property rp 'LocalNorthing)) (setq p (list le ln)) )(defun c:zoomtogeolocation () (setq p (getPositionMarkerCoords)) (command "_.CIRCLE" (getPositionMarkerCoords) "2000000" "ZOOM" "EXTENTS" "_.ERASE" (ssget "x" '((0 . "CIRCLE"))) "" "_GEOMAP" "HYBRID") (princ) )