Reply

How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

 

Hi,

    I want to give dimension to a thickness of the object.

   I just created a rectangular through VB6. I can give dimansion to the length and breadth but I cant give dimension to thickness after the sketch is protruded.

And one more thing. How can I give driving dimension

I have attached the image of the model.

 

 

Posted by: Pritam Dulam
Post date: 8/11/2009 1:30:15 AM

9 REPLIES

RE: How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

Hi me,

 

you must make a model like this:

 

Dim objEPProfArray(1 To 3) As Object 'SolidEdgePart.Profile

 

Set objEPProfile = objDoc.Sketches(1).Profiles(1)

Set objEPProfArray(1) = objEPProfile

Set objModel = objDoc.Models.AddFiniteExtrudedProtrusion(NumberOfProfiles:=1, _

ProfileArray:=objEPProfArray, ProfilePlaneSide:=igLeft, ExtrusionDistance:=0.1)

 

What is "driving dimension"?

 

Regards

jr

 

 

 

Posted by: JR
Post date: 8/11/2009 2:51:41 AM

RE: How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

 

This is the code I used to draw the sketch and protrude it.... what is the difference between ur's and mine. PLease explain in detail.

Set objRefPlane = objDoc.RefPlanes.AddParallelByDistance( _

                            ParentPlane:=objDoc.RefPlanes(1), _

                            Distance:=0, _

                            NormalSide:=igLeft, _

                            Local:=True)

 

    ' Create a new profile to use for the feature.

 

    Set objProfiles(1) = objDoc.ProfileSets.Add.Profiles.Add(objRefPlane)

 

    ' Get the model space origin relative to profile space.

    Call objProfiles(1).Convert3DCoordinate(x3d:=0, _

                                    y3d:=0, z3d:=0, _

                                    x2d:=dblX, y2d:=dblY)

 

    ' Draw a rectangle for the profile graphics.

    Dim LineAB As Line2d

    Dim LineBC As Line2d

    Dim LineCD As Line2d

    Dim LineAD As Line2d

 

    Set LineAB = objProfiles(1).Lines2d.AddBy2Points(0.05, 0.05, 0.05, -0.05)

    Set LineBC = objProfiles(1).Lines2d.AddBy2Points(0.05, 0.05, -0.05, 0.05)

    Set LineCD = objProfiles(1).Lines2d.AddBy2Points(-0.05, 0.05, -0.05, -0.05)

    Set LineAD = objProfiles(1).Lines2d.AddBy2Points(-0.05, -0.05, 0.05, -0.05)

 

 

 

    Call objProfiles(1).Relations2d.AddKeypoint(LineAB, igLineStart, LineBC, igLineStart, True)

    Call objProfiles(1).Relations2d.AddKeypoint(LineBC, igLineEnd, LineCD, igLineStart, True)

    Call objProfiles(1).Relations2d.AddKeypoint(LineCD, igLineEnd, LineAD, igLineStart, True)

    Call objProfiles(1).Relations2d.AddKeypoint(LineAB, igLineEnd, LineAD, igLineEnd, True)

 

    'objProfiles(1).Visible = False

    ' End and validate the profile.

    lngStatus = objProfiles(1).End(ValidationCriteria:=igProfileClosed)

    If lngStatus 0 Then

        MsgBox "Invalid Profile"

        Exit Sub

    End If

 

    Call objProfiles(1).Dimensions.AddDistanceBetweenObjects(LineAB, 0.05, -0.05, 0, _

                                                     True, LineCD, -0.05, -0.05, 0, True)

    Call objProfiles(1).Dimensions.AddDistanceBetweenObjects(LineBC, 0.05, 0.05, 0, _

                                                     True, LineAD, 0.05, -0.05, 0, True)

 

    ' Create the base protrusion feature.

    Set objModel = objDoc.Models.AddFiniteExtrudedProtrusion(1, _

                                    objProfiles, _

                                    igRight, _

                                    0.01)

 

Driving Dimension  are dimensions which when changed also changes the geometry of the object.

 

Posted by: Pritam Dulam
Post date: 8/11/2009 7:15:23 PM

RE: How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

 

Hi me,

 

how did you declared objProfiles ?

 

Regards

JR

 

Posted by: JR
Post date: 8/11/2009 8:16:59 PM

RE: How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

Hi me,

 

for the driving dimension you must set the property Constraint (of the dimension) to TRUE. For your example:

 

Dim dim1 As SolidEdgeFrameworkSupport.Dimension

Dim dim2 As SolidEdgeFrameworkSupport.Dimension

 

Set dim1 = objProfiles(1).Dimensions.AddDistanceBetweenObjects(LineAB, 0.05, -0.05, 0, _

True, LineCD, -0.05, -0.05, 0, True)

Set dim2 = objProfiles(1).Dimensions.AddDistanceBetweenObjects(LineBC, 0.05, 0.05, 0, _

True, LineAD, 0.05, -0.05, 0, True)

dim1.Constraint = True

dim2.Constraint = True

 

Regards

JR

 

 

Posted by: JR
Post date: 8/11/2009 8:45:41 PM

RE: How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

 

HI,

    But My main proble is still intact. I need to give dimension to the width of the solid after extrudedprotrusion is executed.........

please reply......

 

Posted by: Pritam Dulam
Post date: 8/12/2009 7:42:59 PM

RE: How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

Hi,

 

if you want to change the ExtrusionDistance, you can do that with:

 

objModel.ExtrudedProtrusions.Item(1).Depth = 0.05

 

Regards

JR

 

Posted by: JR
Post date: 8/12/2009 8:20:56 PM

RE: How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

 

HI,

  No Dude I need to place a dimension to the protrusion.......

 

Posted by: Pritam Dulam
Post date: 8/12/2009 8:27:02 PM

RE: How to Give Dimension to a protrusion(thickness of object)

[ Edited ]

Hi,

 

you must define the dimensions in the sketch (profile), set the Constraint property of the dimension to TRUE and change the VALUE of the dimension.

 

Posted by: JR
Post date: 8/12/2009 8:52:59 PM

Re: RE: How to Give Dimension to a protrusion(thickness of object)

I think you cannot explicitly add a dimension to the newle created feature.

A dimension is automatically created for you.

If you want to access the feature dimensions created, you can use .GetDimensions

 

Dim nDims As Integer = 0
Dim featDims As Array = Array.CreateInstance(GetType(System.Object), 0)
oExtCutout.GetDimensions(nDims, featDims)

 

Hope this helps,

Paolo Marani