Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to print the minimum radius of a spline (SolidWorks 2007 API)

Status
Not open for further replies.

bilyp

Mechanical
Joined
Sep 3, 2008
Messages
8
I need to print the minimum radius of a spline. I ran a macro so as the minimum radius of a spline to be shown but i want to print that value also. Has anybody any idea? Thanks!!
 
If your macro has code, you might try to post it here.
 
I'm surprised that a spline can have a minimum radius? Perhaps you are working with the maximum curvature? I would be interested to see how you capture that.

--
Hardie "Crashj" Johnson
SW 2008 SP4
Nvidia Quadro FX 1000
AMD Athalon 1.8 GHz 2 Gig RAM

 
Sketch a spline and exit the sketch.Then run the code:
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swModelDocExt As SldWorks.ModelDocExtension
Dim swSpline As SldWorks.SketchSpline
Dim boolstatus As Boolean

Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
boolstatus=swModel.Extension.SelectByID2("Spline1@Sketch1", "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
Set swSpline = swSelMgr.GetSelectedObject6(1, 0)
swSpline.ShowMinimumRadius = True
End Sub

The minimum radius is appeared ant I want to export that and save. Any idea? Thanks for your interesting!
 
Seems you can't get curvature value of a spline, but you can get the minimum curvature of a body.

Perhaps using SketchSegment::CreateWireBody to convert the spline to a body will allow access to value via Body2::MinimumRadius.

[bat]Honesty may be the best policy, but insanity is a better defense.[bat]
-SolidWorks API VB programming help
 
How?That would be nice too...!!!
 
I have a similar question. Is it possible to control the minimum radius of a spline? It seems like the routing software must do this when it calculates a spline for a wire or wire bundle with a given minimum bend radius. We don't have routing and make chillers and have to route tubing/hoses that have minimum bend radii. Splines might be more friendly than using many arcs but we need to be sure we don't violate a minimum bend radius.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top