;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Civil3Dblog.com ;Paste Style Property ;Routine provided as is, use at your own risk. ;Routine may be freely distributed as long as all references to Civil3Dblog.com remain in routine. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun C:pst (/ acadobj aecapp aecProj aecsurfs aecsurf aecDoc aecutil ent_source obj_source val_source ent_target obj_target) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (vl-load-com) (princ "\n") (princ "Copy and Paste Style:") (princ "civil3Dblog.com") (princ "\n") (setq ent_source (car (entsel "\nSelect Source Object: "))) (setq obj_source (vlax-Ename->Vla-Object ent_source)) (setq check (vlax-property-available-p obj_source 'Style T)) (cond ((= check nil)((princ "\n")(princ "Object does not have a Style property.")(Princ "\n")(quit))) (t (princ "OK")(setq val_source(vlax-get obj_source "Style"))(Princ val_source)) ) (setq ent_target (car (entsel "\nSelect Target Surface Object: "))) (setq obj_target (vlax-Ename->Vla-Object ent_target)) (setq check (vlax-property-available-p obj_target 'Style T)) (cond ((= check nil)((princ "\n")(princ "Entity does not have a Style property.")(Princ "\n")(quit))) (t (princ "OK")(vlax-put obj_target "Style" val_source)) ) (princ "\n") (princ "civil3Dblog.com") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (princ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Civil3Dblog.com ;Paste Style Property ;Routine provided as is, use at your own risk. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;