.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add a Line using Surveyor units

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Rob.O
962 Views, 10 Replies

Add a Line using Surveyor units

Hi All,

 

Can someone get me started on adding a line to the database using surveyors units (preferably in VB).

 

Command: line

Specify first point: 0,0
Specify next point or [Undo]: @104.88'<N57d59'45"W

 

I know how to add normal Point3D line:

 

Dim acLine As Line = New Line(New Point3d(5, 5, 0), New Point3d(12, 3, 0))

But not sure how to do it with an angled line.

 

 

Thanks!

10 REPLIES 10
Message 2 of 11
Rob.O
in reply to: Rob.O

I really need help with this.

 

Does anyone have any ideas how to go about this?

 

Any help is greatly appreciated!

Message 3 of 11
jamierobertson1
in reply to: Rob.O

I dont think you can, you'd have to calculate the second point yourself from the start point, range and bearing.

 

Possibly you could get away with using Document.SendStringToExecute()  and pass your commandline entries.

 

 

Message 4 of 11
Hallex
in reply to: Rob.O

Posted on swamp

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 5 of 11
chiefbraincloud
in reply to: Rob.O

Why don't you try posting what you've got so far, so that we can tell what part you're hung up on.  The trigonometry is pretty simple.

Dave O.                                                                  Sig-Logos32.png
Message 6 of 11
Rob.O
in reply to: chiefbraincloud

Thanks for the info all!  I have been sidetracked onto another task for the next few days, so I will jump back to this problem once I have completed the other task and check out what you have all posted!

 

Chief... unfortuantely I don't have anything.  I am still very green at this .NET stuff and so I usually look for samples in the SDK or in the .NET developers guide or in the forums.  I try tailoring those samples to fit my needs.  In this case, I could not find ANYTHING so I don't even have a start! 😞

 

Thanks again!

 

Message 7 of 11
Hallex
in reply to: Rob.O

I think it could be done using awesome class

CommandLine.vb written by Tony Tanzillo

I just don't know about surveyor rules,

I mean how to define angles for all quadrants

Than I could be able to parse D-M-S format

to decimals using Regular expression and

pull this value into the command line using

class I have mentioned above

See picture and show me how to

draw it right instead

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 8 of 11
Hallex
in reply to: Rob.O

Try attached code

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 9 of 11
Rob.O
in reply to: Hallex

Hallex,

 

Thank you SO much for this!  This is EXCELLENT!

 

I need to make a few adjustments here and there.  Such as allowing the directions to be entered without an angle in case the user needs to enter a true North direction etc, but this it GREAT!

 

Thanks again for your help!

Message 10 of 11
Hallex
in reply to: Rob.O

Glad to help

If you would be want to share your final

solution with our community

it would be interesting for somebody else...

Cheers 🙂

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 11 of 11
Rob.O
in reply to: Hallex

I am working on updating it to work with polylines right now, so as soon as I have it finished I will defiantely post it!

 

Thanks again!

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost