Autocad's "Divide" command in solidworks?

Hello, i've got 2 questions

Is there a command in solidworks like the command "divide" i

autocad This command divides a line in x equal part

second, i have a circular tube and i want to draw a line from 1 end o

the center of the tube to the other center of the tube without havin to use reference planes. 3D sketch isn't possible because the cente snap doesn't work in 3d sketc

Anyone has some ideas?

Many thanks in advanc


Reply to
Loading thread data ...

Divide - the only thing I can think of is a circular pattern where you tell it 360° or so and then how many to equally space.

Axis - go up to the View menu and turn on the temp axes. I have that command tied to my "t" key.


Reply to
Wayne Tiffany

I think you can place a specific number of points on curve, and then use those to divide. off the top I cannot remember the exact command to do that... but have a look in sketch tools.

What is your goal? what are you doing with the sketch? maybe there is another way or better solution to what you are trying to do. Same goes for the question in your first question.


Reply to

No, but you can get the result you want by doing the following:

Draw a line. Use the split entities command to split the line into the desired number of segments. Select all line segments. Add an equal relation.

Why do you need a line down the center of the tube end to end? Turn on Temporary Axes. Start a 3D sketch and sketch a line. Select the line and the temporary axis in the center of the tube. Add a collinear relation.

Another way: Start a 3D sketch and sketch a line. Select one endpoint of your line. Select a circular edge at the end of your tube. Add a concentric relation. Do the same for the other endpoint and other end of the tube.

In either case if you want to constrain the endpoints of the line to the ends of the tube you can select the endpoint, then select the face or outer circular edge of the end of the tube and add a coincident relation.

Reply to
Jeff N

Here is a macro:

'----------------------------------------- ' How to split a sketch segment into a number of equal portions ' ' Preconditions: ' 1) a part, assy or drawing is open ' ' 2) a sketch is being edited ' ' 3) a sketch segment is selected ' ' Postconditions: ' 1) sketch segment is divided into equal sections ' ' Notes: ' 1) current code calculates division points based on ' curve parameterisation NOT length. This will ' give unequal lengths for: ' splines ' parabolas ' ellipses ' ' Further Work: ' 1) support equal length division of: ' splines ' parabolas ' ellipses ' ' 2) could probably use initial display tessellation of ' pre-selected sketch segment to calculate points for ' sketch segment division

Option Explicit

Public Enum swSketchSegments_e swSketchLINE = 0 swSketchARC = 1 swSketchELLIPSE = 2 swSketchSPLINE = 3 swSketchTEXT = 4 swSketchPARABOLA = 5 End Enum

Sub main() Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swSelMgr As SldWorks.SelectionMgr Dim swSkSeg As SldWorks.SketchSegment Dim swSkLine As SldWorks.SketchLine Dim swSkArc As SldWorks.SketchArc Dim swSkEllipse As SldWorks.SketchEllipse Dim swSkSpline As SldWorks.SketchSpline Dim swSkParabola As SldWorks.SketchParabola Dim swCurve As SldWorks.Curve Dim swStartPt As SldWorks.SketchPoint Dim swEndPt As SldWorks.SketchPoint Dim vSplinePt As Variant Dim vStartPt As Variant Dim vEndPt As Variant Dim vSplitPt() As Variant Dim nStart As Double Dim nEnd As Double Dim nStartDummy As Double Dim nEndDummy As Double Dim bIsClosed As Boolean Dim bIsPeriodic As Boolean

Dim sNumSeg As String Dim nNumSeg As Long

Dim i As Long Dim bRet As Boolean

Set swApp = CreateObject("SldWorks.Application") Set swModel = swApp.ActiveDoc Set swSelMgr = swModel.SelectionManager Set swSkSeg = swSelMgr.GetSelectedObject3(1) Set swCurve = swSkSeg.GetCurve

sNumSeg = InputBox("Enter number of divisions") nNumSeg = Val(sNumSeg)

ReDim vSplitPt(nNumSeg)

Select Case swSkSeg.GetType Case swSketchLINE Debug.Print "swSketchLINE" Set swSkLine = swSkSeg Set swStartPt = swSkLine.GetStartPoint2 Set swEndPt = swSkLine.GetEndPoint2

Case swSketchARC Debug.Print "swSketchARC" Set swSkArc = swSkSeg Set swStartPt = swSkArc.GetStartPoint2 Set swEndPt = swSkArc.GetEndPoint2

Case swSketchELLIPSE Debug.Print "swSketchELLIPSE" Set swSkEllipse = swSkSeg Set swStartPt = swSkEllipse.GetStartPoint2 Set swEndPt = swSkEllipse.GetEndPoint2

Case swSketchSPLINE Debug.Print "swSketchSPLINE" Set swSkSpline = swSkSeg

vSplinePt = swSkSpline.GetPoints2

Set swStartPt = vSplinePt(0) Set swEndPt = vSplinePt(UBound(vSplinePt))

Case swSketchPARABOLA Debug.Print "swSketchPARABOLA" Set swSkParabola = swSkSeg Set swStartPt = swSkParabola.GetStartPoint2 Set swEndPt = swSkParabola.GetEndPoint2 End Select

bRet = swCurve.GetEndParams(nStartDummy, nEndDummy, bIsClosed, bIsPeriodic)

vStartPt = swCurve.GetClosestPointOn(swStartPt.x, swStartPt.y, swStartPt.z) vEndPt = swCurve.GetClosestPointOn(swEndPt.x, swEndPt.y, swEndPt.z)

nStart = vStartPt(3) nEnd = vEndPt(3)

' calculate division points based on curve parameterisation For i = 1 To nNumSeg - 1 bRet = swSkSeg.Select3(False, 0, Nothing)

vSplitPt(i) = swCurve.Evaluate(nStart + (nEnd - nStart) * i / nNumSeg) Debug.Print " Length(" & i & ") = " & swCurve.GetLength2(nStart + (nEnd - nStart) * (i - 1) / nNumSeg, nStart + (nEnd - nStart) * i / nNumSeg)

  • 1000# & " mm" Next i

' divide sketch segment For i = 1 To nNumSeg - 1 bRet = swSkSeg.Select3(False, 0, Nothing)

swModel.SplitOpenSegment vSplitPt(i)(0), vSplitPt(i)(1), vSplitPt(i)(2) Next i End Sub '-----------------------------------------

Best Regards, Devon T. Sowell

formatting link

Reply to
Devon T. Sowell

Thanks for the info @ Devon T. Sowell, i don't really understand what i have to do wit the information you gave. It looks like some kind of config fil settings?

I am looking for this information because i have to draw som

components made of trusses

formatting link
want to draw a truss in a way that i can easily adjust the angl between the braces(03) and the main chords(01), the amount of spac between the braces, and the amount of braces

So i don't think it is handy when i have to draw every brace on

reference plane. In autocad this is easily done by drawing a tub (after specifying the diameter) from one point to another point, an then you can just mirror it and copy agai

Anyone has any ideas how this can be drawn with solidworks


Reply to


Does 03 pierce 01 or does 01 trim 03?

Reply to

does anyone know a good way to draw a truss like this in a way how yo can easily adjust it

btw, hoe does it work with posting images



Reply to

I gave it a try using the weldment functionality and it was extremely easy to model. All it took was two 3D sketches, insert the structural members, trim the ends as you want, create a circular pattern of the braces and you are done.

Reply to

You're not supposed to post images in this group. If you do, many of the news servers will strip them out, so most of us don't see them. You did it the right way, posting it some place that we can go to see it.

Jerry Steiger Tripod Data Systems "take the garbage out, dear"

Reply to
Jerry Steiger


03 goes from the center of 1 chord (01) to the center of the othe

chord but it can go from the surface of 1 chord to the surface of the othe chord as wel, because when you merge the result, you won't see th differenc


Reply to

the entire truss can be done with a few 2d sketches using the weldment feature (round tubes can be trimmed in '05).

Reply to
kb (Hendrik) wrote in messag news:..


I gave it a try using the weldment functionality and it was extremel easy to model. All it took was two 3D sketches, insert th structura members, trim the ends as you want, create a circular pattern of th braces and you are done.[/quote:bb936a6a64

that's good to hear mike

but i have never heard of the weldment functionality, could u describ how u made the truss (in a detailed way), or sent the file to m email-adres many thank

Reply to

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.