Julien
Guest
|
Posted:
Mon Nov 15, 2004 9:39 pm Post subject:
How to draw an ellipse from origin, 2 axis, and rotation ang |
|
|
Hi,
How can I program the drawing of an ellipse in a macro ?
Ideally, I want to recover primary and secondary axis,
as well as orientation (1st axis azimuth) from a text file,
and this for many error ellipses to draw.
Of course, I can use MbeSendCommand "PLACE ELLIPSE",
compute the extremities of primary and secondary axis
and send them through MbeSendDataPoint.
However, I'm fast sure there must be some simpler way to solve the problem,
like:
Sub DrawEllipse
Dim ellipse as New MbeElement
' ... tell that the element is of type ellipse
' ... give origin and orientation of primary axis
ellipse.primaryAxis = 2.345
ellipse.secondaryAxis = 1.234
' ... optional other statements
ellipse.display(MBE_NormalDraw)
' ...
End Sub
I encounter a few problems :
- The MbeElement.type property is read only,
so how to set the type of an element ?
- How can I set the origin of an element,
in this case the center of the ellipse ?
- Should I use MbeElement.rotate
to define the ellipse orientation
before drawing it ?
Thanks for any answer.
Julien
|
|
Inga Morozoff [Bentley]
Guest
|
Posted:
Tue Nov 16, 2004 2:52 am Post subject:
Re: How to draw an ellipse from origin, 2 axis, and rotation |
|
|
I can't help you with your problem, but perhaps if you post this on the
appropriate group at http://discussion.bentley.com you might get some good
replies.
More information about Bentley's discussion groups can be found here:
http://selectservices.bentley.com/discussion/
--
Best Regards,
Inga Morozoff [Bentley]
www.askinga.com
"Julien" <JulienRouiller@yahoo.fr> wrote in message
news:86e1952b.0411150839.177eea0e@posting.google.com...
| Quote: | Hi,
How can I program the drawing of an ellipse in a macro ?
Ideally, I want to recover primary and secondary axis,
as well as orientation (1st axis azimuth) from a text file,
and this for many error ellipses to draw.
Of course, I can use MbeSendCommand "PLACE ELLIPSE",
compute the extremities of primary and secondary axis
and send them through MbeSendDataPoint.
However, I'm fast sure there must be some simpler way to solve the
problem,
like:
Sub DrawEllipse
Dim ellipse as New MbeElement
' ... tell that the element is of type ellipse
' ... give origin and orientation of primary axis
ellipse.primaryAxis = 2.345
ellipse.secondaryAxis = 1.234
' ... optional other statements
ellipse.display(MBE_NormalDraw)
' ...
End Sub
I encounter a few problems :
- The MbeElement.type property is read only,
so how to set the type of an element ?
- How can I set the origin of an element,
in this case the center of the ellipse ?
- Should I use MbeElement.rotate
to define the ellipse orientation
before drawing it ?
Thanks for any answer.
Julien |
|
|