Author Topic: Grading Spot Block help  (Read 2127 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Grading Spot Block help
« on: February 01, 2005, 11:31:21 AM »
I am trying to make a grading spot for site work.. but i am only getting partly there... I have added in the code where you only put on value on the S2. and it will subtract the value from the one you input so you do not have to type the value in twice...

And i am trying to get a 45 degree + or X to show at the end of the line to show that is where the spot is located. that is not working...

any help would be great!

Code: [Select]
(defun c:S1 ()
(setq TxtHt (getreal "\nText height for label: ")
      Pt1 (getpoint"\nPick point for elevation: ")
      Pt2 (getpoint Pt1 "nPick elevation label point: ")
)
(setq BkName (if (> (car Pt2) (car Pt1))  "SpotRight" "SpotLeft"))
(setq SpotElev (getreal "\nEnter elevation: ")
      SpotHigh (- 0.5 SpotElev)
      SpotElevTxt (rtos SpotElev 2 2)
      SpotHighTxt (rtos SpotHigh 2 2)

)
(command "line" pt1 pt2 "")
(command "-insert" BkName Pt2 TxtHt TxtHt 0 SpotElevTxt SpotHighTxt)
(princ)
)

(defun c:S2 ()
(setq TxtHt (getreal "\nText height for label: ")
      Pt1 (getpoint"\nPick point for elevation: ")
      Pt2 (getpoint Pt1 "nPick elevation label point: ")
)
(setq BkName (if (> (car Pt2) (car Pt1))  "SpotRight2" "SpotLeft2"))
(setq SpotElev (getreal "\nEnter elevation: ")
      SpotHigh (+ 0.5 SpotElev)
      SpotElevTxt (rtos SpotElev 2 2)
      SpotHighTxt (rtos SpotHigh 2 2)
)
(command "line" pt1 pt2 "")
(command "-insert" BkName Pt2 TxtHt TxtHt 0 SpotElevTxt SpotHighTxt)
(princ)
)


here is the spot.dwg with the blocks int it.
http://www.theswamp.org/lilly_pond/mstg007/SPOT.DWG?nossi=1
Civil3D 2020