Hi,
Before proceeding further with your programming here, you may care to study
the "pellipse" system variable.
--
Regards,
Laurie Comerford
www.cadapps.com.au
"GPaolo" wrote in message
news:4865982@discussion.autodesk.com...
Try this.
I hope that this is tat you need.
Ciao
GPaolo
Function HMelliarc(ByVal SemiAxisMajor As Double, ByVal SemiAxisMinor As
Double)AS AcadLWPolyline
Dim LWpoly As AcadLWPolyline
Dim I As Integer
Dim J As Integer
Dim SinArc As Double
Dim aini As Double
Dim afin As Double
Dim Pnt(2) As Double
Dim Center(2) As Double
Dim Rapp As Double
Dim Vertex(2162) As Double
Dim MyInd As Long = -1
aini = 0.0
afin = TwoPI()
SinArc = afin / 720.0
Rapp = SemiAxisMinor / SemiAxisMajor
'*******************************************************
'''''''' G E S T I O N E E L L I S S I
'*******************************************************
For J = 0 To 720
Pnt(0) = (SemiAxisMajor * Cos(aini))
Pnt(1) = (SemiAxisMajor * Sin(aini)) * Rapp
Pnt(2) = 0.0
MyInd += 1
Vertex(MyInd) = Pnt(0)
MyInd += 1
Vertex(MyInd) = Pnt(1)
MyInd += 1
Vertex(MyInd) = Pnt(2)
aini += SinArc
Next J
LWpoly=THISDRAWING.MODESSPACE.ADDLWPOLYLINE .........
HMELLIARC=LWpoLY
END FUNCTION
"ljb" <.> ha scritto nel messaggio news:4865118@discussion.autodesk.com...
I need to convert an ellipse to a polyline in AutoCAD 2000 vba but an
ellipse can't be exploded. When AutoCAD 2000 saves the ellipse as an r12 DXF
it is converted to a 3d-polyline. How do I do the same?
Set sset = .SelectionSets.Add("ConvertEllipse")
grpCode(0) = 0: grpValue(0) = "ellipse"
sset.Select acSelectionSetAll, , , grpCode, grpValue
If sset.Count > 0 Then
For Each ssItem In sset
If ssItem.ObjectName = "AcDbEllipse" Then ????
Next
End If
thanks
LJB