Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change lisp to measure between 2 cogo points

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
allanbsteven
834 Views, 14 Replies

Change lisp to measure between 2 cogo points

Hi There,

Can anyone help to amend this great routine so i can measure between 2 cogo points instead of 2 points.

Anyhelp is appreciated.

Regards

Allan

;;;**************** DISPLAYS BRG & DISTANCE BETWEEN 2 POINTS

(DEFUN C:DDD ()
  (SETQ PT1 (GETPOINT "\nDIST BETWEEN 2 POINTS ... First Point..."))
  (SETQ PT2 (GETpoint pt1 "\nNext Point..."))
  (command "dist" pt1 pt2)
  (setq dist1 (rtos (getvar "distance") 2 3))
  (setq brg1 (angtos (angle pt1 pt2)))
  (setq bdtxt (strcat "BEARING   " brg1 "      DISTANCE    " dist1))
  (alert bdtxt)
  (princ)
)							    ;CLOSE DEFUN

*****************************************************************************

 

14 REPLIES 14
Message 2 of 15
Jeff_M
in reply to: allanbsteven
Message 3 of 15
allanbsteven
in reply to: Jeff_M

Thanks Jeff,

I read all about this and tried it. This does not let me specify a point number 'PN..... Also I want it to show up on the screen (Alert).

The lisp i showed before was great and simple, basically work the same but having either bt selecting the cogo or using a cogo number....

No worries if this is too difficult, we are having surveyors in here get very frustrated with the tools that come with civil3d. I can use the di command but it spit out with 3d distance....

Cheers

Al

 

Message 4 of 15
allanbsteven
in reply to: Jeff_M

Hi Jeff,

Not sure if you can help with this as I am still no closer to have this accept 'PN and use Cogo-points for selection, I'd appreciate any help as the single-inv is not much use for what I want?

Any help is appreciated and understand if you are too busy to look at it.

Cheers

Allan

Message 5 of 15
Jeff_M
in reply to: allanbsteven

Sorry, Allan, was quite busy and then forgot all about this. The attached does essentially what you want, although not with the built in Transparent commands. You have 3 options for each point of interest (point 1 & point 2): just pick a random point on screen, Enter PN to select a CogoPoint by Number, or enter PO to select a CogoPoint on screen. I didn't test to see what 'bad' things would happen if you have an invalid entry. 

 

 

Jeff_M, also a frequent Swamper
EESignature
Message 6 of 15
allanbsteven
in reply to: Jeff_M

Wow Jeff,

That is brilliant, it works for vertical distance only. I need it for horizontal distance only, is this a possibility?

Thanks so much for your time and effort for this one.

Regards

Allan

Message 7 of 15
Jeff_M
in reply to: allanbsteven

Serves me right for testing in a drawing with points nearly level. Here's a revised version that gives both the 2d & 3d(slope) distances.

 

Jeff_M, also a frequent Swamper
EESignature
Message 8 of 15
allanbsteven
in reply to: Jeff_M

Is it possible to show both slope and horizontal distance?

Seems very tricky to get horizontal from cogo points..........

Best regards

Allan

Message 9 of 15
allanbsteven
in reply to: Jeff_M

Jeff,

That works..............................BUT it now does not show correct bearing from  north  if that makes sence?

Just how the previous ddd sjowed an agle off true north....

Thanks so much

best regards

Allan

Message 10 of 15
Jeff_M
in reply to: allanbsteven

Not sure why...it shows the correct bearing for me. Just remove the formatting to be as it was before (I'd added it becasue the drawing I was testing in had the units for angles to show degrees only).

 

Change this line:

(setq brg1 (angtos (angle pt1_2d pt2_2d) 4 4))

 

to this:

(setq brg1 (angtos (angle pt1_2d pt2_2d)))

 

and it will use the current display settings for angles, exactly how it was originally.

Jeff_M, also a frequent Swamper
EESignature
Message 11 of 15
allanbsteven
in reply to: Jeff_M

Thanks so much! Legend!!

Message 12 of 15
allanbsteven
in reply to: Jeff_M

Jeff,

I understand if this is too much to ask, so i understand if you are not interested in helping with this one. One of my fellow collegues asked if we can include the attached information? A surveyors dream I am told, which civilcad here in Australia displays this query?  Can it be matched? No worries if not. cheers Allan

1.jpg

Message 13 of 15
Jeff_M
in reply to: allanbsteven

Allan, sure that output could be obtained. I'm not interested in doing so, however. SincpacC3D already gives all of this info, albeit on the command line:

Command: _.PtInv
--Pick base point or enter Pt Num [Continuous/Multiple/Reset]: 20043
--Pick next point or enter Pt Num [Continuous/Multiple/Reset]: 20026
HD: 111.8980 [111.8980] SD: 111.8982 [111.8982]
Bear: N 70d58'43" E Slope: 478.197:1 Grade: 0.209%
E1: 126.50 E2: 126.73 dX: 105.7880 dY: 36.4700 dZ: 0.2340

 

I'm thinking that I may go ahead and place that data into a palette.

Jeff_M, also a frequent Swamper
EESignature
Message 14 of 15
allanbsteven
in reply to: Jeff_M

No problem, thanks very much anyway. Just of interest would you be interested in tailoring infomation like this to individual companies?

Just curious.

Thanks again

Al

Message 15 of 15
Jeff_M
in reply to: allanbsteven

Al, shoot me an email if you'd like. jeffm AT quuxsoft DOT com
Jeff_M, also a frequent Swamper
EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report