- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a 100+ drawing that I need to edit the Profile View styles vertical scale to 4.0. My plan is to run a script on all these drawings using this script file. Here is the program I have so far. It gets hung up the line: (setq style (vla-get-Style obj))
My lisp skills for Civil 3d are not the best.
(defun c:VERT_SCALE_4 (/ ss i ent obj style)
(vl-load-com)
;; Search the entire drawing for Profile View objects
(setq ss (ssget "_X" '((0 . "AECC_PROFILE_VIEW"))))
(if ss
(progn
(setq i 0)
(repeat (sslength ss)
(setq ent (ssname ss i))
(setq obj (vlax-ename->vla-object ent))
;; Access the style and its graph settings
(setq style (vla-get-Style obj))
(vlax-put-property (vla-get-Graphstyle style) 'VerticalExaggeration 4.0)
(vla-update obj)
(setq i (1+ i))
)
(princ (strcat "\nUpdated " (itoa i) " Profile View(s)."))
)
(princ "\nNo Profile Views found in drawing.")
)
(princ)
)
paul
c3d 2024
Solved! Go to Solution.