First, I apologize for my bad English knowledge. I draw patterns for the cnc machine and know that I need to export the finished artwork to dxf format. This solution does not produce nice circles. This will make the circle replace many small lines, which is unnecessary code and time I try to write a VBA macro, which converts the drawings by coordinate system, starting, finishing points. Linear graphics (type = cdrLineSegment) have no problem, but I was jammed at the bezier curves. How can I break a curve line to get circles? I found such an example program, but this is still a small one:
For Each sp In s.Curve.SubPaths For Each seg In sp.Segments 'cdrLineSegment=0 cdrCurveSegment=1 'cdrMixedSegments=2 ConvertUnits(35,cdrInch,cdrMillimeter) If seg.Type = cdrLineSegment Then ..... ElseIf seg.Type = cdrCurveSegment Then Debug.Print "Length: " & ConvertUnits(seg.Length, cdrInch, cdrMillimeter) Debug.Print " StartX: " & ConvertUnits(seg.StartNode.PositionX, cdrInch, cdrMillimeter) & vbTab & _ " StartY: " & ConvertUnits(seg.StartNode.PositionY, cdrInch, cdrMillimeter) & vbTab & _ " StartAng: " & seg.StartingControlPointAngle & vbTab & _ " StartControlPoint: " & ConvertUnits(seg.StartingControlPointLength, cdrInch, cdrMillimeter) & vbTab & _ " EndX: " & ConvertUnits(seg.EndNode.PositionX, cdrInch, cdrMillimeter) & vbTab & _ " EndY: " & ConvertUnits(seg.EndNode.PositionY, cdrInch, cdrMillimeter) & vbTab & _ " EngAng: " & seg.EndingControlPointAngle & vbTab & _ " EndControlPoint: " & ConvertUnits(seg.EndingControlPointLength, cdrInch, cdrMillimeter)
end if
next
Thanks in advance for all the help
I have never used them, as I do not need to produce good DXF from CorelDRAW - but have you looked at any commercial solutions that are already available, e.g., DXFTool?
I want to create a similar VBA macro like DXFTool.(Yes, DXFtool would be a good solution, but there is no free version, just trial)