Senthilnathan Pl

Differentiate Straight Edge and Curved Edge in a Drawing View

Discussion created by Senthilnathan Pl on Oct 29, 2020
Latest reply on Oct 30, 2020 by Eddy Alleman

Dear All,

I have a Drawing View1 in which I am selecting all the visible Edge of a particular component using Solidworks API ( vedges = myview.GetVisibleEntities2(vComps(i), swViewEntityType_Edge))

Dim swEdge As SldWorks.Edge
Dim swEnt As SldWorks.Entity
For Each vEdge In vedges
Set swEdge = vEdge
Set swEnt = swEdge
bRet = swEnt.Select4(True, Nothing)


In this Process, I would like know whether selected Edge is Straight line or it is Curved Edge?

Differentiate Straight and Curved Edge in a Drawing View

I have tried to get curve type from the following code.

Set swCurve = swEdge.GetCurve
Set swCurveParaData = swEdge.GetCurveParams3

Debug.Print "The curve type as defined in swCurveType_e is: " & swCurveParaData.CurveType


But even if the some straight edges are selected, Solidworks always return swCurveParaData.CurveType = swCurveTypes_e.CIRCLE_TYPE


Am I Missing something here?

Please help