leonucadomi Posted September 11, 2023 Posted September 11, 2023 hello masters: I have definition of attributes and I need to change their numerical value example : 3.288 (meters) I need to touch that text (definition of attributes) and convert it to feet some help please? thanks Quote
Tsuky Posted September 11, 2023 Posted September 11, 2023 A start with this ? (defun c:foo ( / ss ename nw_str) (vl-load-com) (setq ss (ssget '((0 . "INSERT") (66 . 1)))) (cond (ss (repeat (setq n (sslength ss)) (setq ename (vlax-ename->vla-object (ssname ss (setq n (1- n))))) (mapcar '(lambda (att) (setq nw_str (rtos (/ (atof (vlax-get att 'TextString)) (cvunit 1 "meter" "feet")))) (if (/= nw_str "") (vlax-put att 'TextString nw_str) ) ) (vlax-invoke ename 'GetAttributes) ) ) ) ) (prin1) ) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.