I was playing around with creating a routine that would allow you to change the profile view station and elevation rather than right clicking on the profile view and going through all the tabs.
I do have something together, however I am having a problem making the match properties of the command.
This will prompt the user to enter the values with a Start Station and End Station, with a Min Elevation and Max Elevation.
(defun C:PRS ( / StaS StaE ElevMin ElevMax )
(vl-load-com)
;;https://forums.autodesk.com/t5/civil-3d-customization/define-profile-view-station-and-elevation-ranges-via-lisp/td-p/9683823
;Unlocks ProfileView station and elevation inputs
(setq pvent (car (entsel)))
(setq pv (vlax-ename->vla-object pvent))
(if (= 0 (vlax-get pv 'elevationlocked))
(vlax-put-property pv 'elevationlocked :vlax-false)
)
(if (= 0 (vlax-get pv 'stationlocked))
(vlax-put-property pv 'stationlocked :vlax-false)
)
;(vlax-put pv 'elevationmin 902)
;(vlax-put pv 'elevationmax 928)
;(vlax-put pv 'StationStart -10)
;(vlax-put pv 'StationEnd 30)
(setq StaS (getreal "Enter Start Station: "))
(setq StaE (getreal "Enter End Station: "))
(setq ElevMin (getreal "Enter Min Elevation: "))
(setq ElevMax (getreal "Enter Max Elevation: "))
(vlax-put pv 'StationStart StaS)
(vlax-put pv 'StationEnd StaE)
(vlax-put pv 'elevationmin ElevMin)
(vlax-put pv 'elevationmax ElevMax)
(princ)
)
I am guessing i could use the
;(vlax-get pv 'elevationmin )
;(vlax-get pv 'elevationmax )
;(vlax-get pv 'StationStart )
;(vlax-get pv 'StationEnd )
Then use it as a vlax-put
Thanks for any pointers!