Getting Started Common Acronyms FAQ Forum Help Forum Tips Secure File Upload Helpful GuidelinesInserting and Attaching images, videos, or files to postsProduct Community Directory SELECTsupport
Do you want to draw perpendicular line from known point on element? If so, you can do it using converting element to BSpline and then getting its FrenetFrame. Or if you like to know perpendicular vector to another vector in 2d, then just swap its X and Y coordinates. In 3d it is not as simple, because you need to identify up vector, so you can do a cross product and then another one cross product to get perpendicular vector...
Jons suggestion helps you to project point B on element from point A, so then line AB will be perpendicular to element, because function PointAtDistance returns distance along element to point which is closest to input point, so to point on perpendiculal. Then, when you use this distance in function PointAtDistance, you will get that point.
Or look into VBA help about functions ProjectPointOnPerpendicular, ProjectPointOnPerpendicular1 and ProjectPointOnPerpendicular2
but LineElement.DistanceAtPoint returns distance on particular line element,how is it helpful to place a line at particular point,
As i am very much confused on how to do this, it would be very helpful if i am provided with a sample code on how to do this.
AccuSnap is a user option.
It potentially helps your user locate a point.
Your commands should allow a user to enable AccuSnap, and accept the data points that it generates.
However, AccuSnap is not intended to be used programmatically.
You have other ways available to project a point onto an element.
For example, if you have a line element, then methods LineElement.DistanceAtPoint
provide a way to snap a point programmatically to a line.
regarding locating the points, i already have x,y co-ordinates i should make the mouse point to those co-ordinates on the line element can i do it with ACCUSNAP and then draw the line perpendicular to the line element from the SNAP'ed point .
thanks in advance,
You're asking two distinct questions …
Create a class that Implements ILocateCommandEvents.
Your locate class will behave like other MicroStation tools: in other words, a user familiar
with MicroStation will intuitively understand your tool.
MicroStation is a 3D drawing tool.
When you ask a question such as "How do I draw a line perpendicular to an existing line?",
you must also ask the question "Which way is up?",
because otherwise there is an infinite number of answers to your first question.
The solution to "Which way is up?" is a rotation matrix (Matrix3d).
The matrix tells your computation the plane on which to draw the line.
When writing C#, you probably want to use the MicroStation VBA COM server.
VBA objects are described in
Regards, Jon Summers
i forgot to mention that i m using c# .net
in what language do you want to do it? VBA, plain MDL, C++?
How do i locate particular point(x,y) on a line element, i have element id and (x,y) co-ordinate on it. i have to locate that x,y co-ordinate and draw perpendicular line to it??how would i do this,