I need to create some solid scalene triangles in Solidworks. My problem is making a triangle with all three sides of different sizes. For example the sides of one trinagle need to be 7ft, 6ft and 3.5ft. When I try to use the polygon feature it does not allow me to dimension all sides individually. How do I accomplish this?
here is a macro i wrote. i used the macro recorder. then i modified it to make a working program.
#note the program does not check if it is a scalene triangle.
hope this helps you out. Sean Phillips
Option Explicit
' ****************************************************************************** ' C:\DOCUME~1\sldprt\LOCALS~1\Temp\swx1636\Macro1.swb - macro recorded on 11/25/03 by sldprt ' ****************************************************************************** Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim FeatureData As Object Dim Feature As Object Dim Component As Object
Dim Annotation As Variant Dim retval As Variant Dim SketchName As String Dim PartName As String Dim HoldUserInput As Double
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc boolstatus = Part.Extension.SelectByID("Front Plane", "PLANE", 0, 0,
0, False, 0, Nothing) Part.InsertSketch2 True
'Syntax (OLE Automation) 'retval = ModelDoc2.GetActiveSketch2() Set retval = Part.GetActiveSketch2
'Name = Feature.Name (VB Get property) SketchName = retval.Name
'userPreferenceValue = swInputDimValOnCreate - To specify that the modify spin box 'is automatically displayed for the input of a new dimension value, select this check box
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.