Author Topic: Profile View - Get / Put ElevationMin  (Read 122 times)

0 Members and 1 Guest are viewing this topic.

entget

  • Mosquito
  • Posts: 5
Profile View - Get / Put ElevationMin
« on: August 02, 2018, 11:41:10 AM »
hello all - big picture im looking at changing min/max elevation of a profile view by selecting points on the profile. for example, currently the min is 800 and max is 900 - id like to select profile, select a point at 850 and 880 and have the profile 'shrink' to those elevations.

i see there are these properties:
;   ElevationMax = 900.0
;   ElevationMin = 800.0

but cant seem to 'put' new values to them with
(vla-put-ElevationMin (vlax-ename->vla-object(car(nentsel))) 850)
or
(vlax-put-property (vlax-ename->vla-object(car(entsel))) 'ElevationMin 850.0)

...hoping its a syntax fail on my part due to lack of sleep last night - but is there something else im missing?

thanks,
corey

mjfarrell

  • Seagull
  • Posts: 14293
  • Every Student their own Lesson
Re: Profile View - Get / Put ElevationMin
« Reply #1 on: August 02, 2018, 12:14:56 PM »
how often are you changing the elevation (manual) range of your profile views?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

entget

  • Mosquito
  • Posts: 5
Re: Profile View - Get / Put ElevationMin
« Reply #2 on: August 02, 2018, 12:27:50 PM »
just once usually - there is plenty of buffer in order to reduce it later and its really not a big deal to do that when there is only one profile per project but, my current project has 20+ and i start to see the time build up doing this manually. ...and a routine to address the 20 would be nice for the one or two the rest of the time.

...did you have another thought on the front end when creating the profiles?

MSTG007

  • Water Moccasin
  • Posts: 2249
  • I can't remeber what I already asked! I need help!
Re: Profile View - Get / Put ElevationMin
« Reply #3 on: August 02, 2018, 01:14:23 PM »
I hear you. We usually have to do them manually to save space on a sheet. It be cool if you could but we do it manually.
Autodesk Infrastructure Design Suite 2018

mjfarrell

  • Seagull
  • Posts: 14293
  • Every Student their own Lesson
Re: Profile View - Get / Put ElevationMin
« Reply #4 on: August 02, 2018, 02:17:02 PM »
just once usually - there is plenty of buffer in order to reduce it later and its really not a big deal to do that when there is only one profile per project but, my current project has 20+ and i start to see the time build up doing this manually. ...and a routine to address the 20 would be nice for the one or two the rest of the time.

...did you have another thought on the front end when creating the profiles?

possibly....there might be a way to have the automatic portion take a smaller elevation range initially
Be your Best


Michael Farrell
http://primeservicesglobal.com/

entget

  • Mosquito
  • Posts: 5
Re: Profile View - Get / Put ElevationMin
« Reply #5 on: August 02, 2018, 04:14:05 PM »
...ok, yeah - syntax error on my part:
needs quotes around the value "850.0"
(vlax-put-property (vlax-ename->vla-object(car(entsel))) 'ElevationMin "850.0")

...and the profile needs to be set to manual in the dialog box ("0" via vlax-put)
(vlax-put-property Object 'ElevationLocked "0")

following is working code - one more step to get the elevations via a cursor snap to the grid but thats another story...

(defun c:test()
 (setq ProfileObj (vlax-ename->vla-object(car(entsel "\nSelect profile: "))))
 (vlax-put-property ProfileObj 'ElevationLocked "0")
 (vlax-put-property ProfileObj 'ElevationMin (getstring "\nMin: "))
 (vlax-put-property ProfileObj 'ElevationMax (getstring "\nMax: "))
)