×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Linking many Dimensions to a single parameter

Linking many Dimensions to a single parameter

Linking many Dimensions to a single parameter

(OP)
I have a lot of dimensions in a single sketch, approx 120 dimensions. I have around 60 radial dimension in it. I want to link all the radius values to a single parameter. Instead of selecting the dimension individually and linking it to the parameters, is there any other option in catia where I can choose multiple dimension and link it to the parameter. I do not want to use equivalent dimension option. The problem gets even tougher with many similar sketches in the same catpart. Please suggest your ideas.

RE: Linking many Dimensions to a single parameter

hi,
you can select all the radiis in the tree and right click ..go to select objects....equivalent dimensions...in the equivalent dimensions dialog box...right click in the value field...choose edit formula....now you can relate this to a single parameter.

<hope it helps >

RE: Linking many Dimensions to a single parameter

better yet: do NOT put the fillets in the sketch. Add the fillets after the Pad (or pocket) as a solid feature, and then you will have one parameter driving all the fillets.

RE: Linking many Dimensions to a single parameter

After re-reading the original post, my suggestion may not apply. Could you send us a picture of your sketch?

In many cases, it is better to keep sketch simple (no fillets), and use 3D featues later in the tree to add the fillets. Another example is duplicated shapes; do not mirror or draw the same shape within the sketch. Instead, use Symmetryr or Pattern to duplicate the shape.

RE: Linking many Dimensions to a single parameter

This sounds like a job for some iterative code that does this:
1) Find all the "Length Constraints"
2) Loop through the results : looking for "Radius"
3) If radius is found, create the relation


Record your self doing one of them and look at the code.
This will show you how to assign the constraint to the parameter.

One way to see the code that selects all the "Length Constraint" is to record yourself doing a search for them using the Search tool.

Then add code that loops through the search results looking for the word "Radius" and creates the relation.
(assuming the constraints have the names something like "Radius.26")

RE: Linking many Dimensions to a single parameter

Are these features fillets or required radius features in the sketch?

RE: Linking many Dimensions to a single parameter

CODE -->

Sub Link_Radius()

Set Document = CATIA.ActiveDocument

Dim oPart As Part
Set oPart = Document.Part

Dim oBody As Body
Set oBody = oPart.Bodies.Item("PartBody")

Dim oSketch As Sketch
Set oSketch = oBody.Sketches.Item("Sketch.1")

Dim oConstraints As Constraints
Set oConstraints = oSketch.Constraints
    icount = 0
For i = 1 To oConstraints.Count
    
Set Cst = oConstraints.Item(i)
    
If Cst.Type = catCstTypeRadius Then
Dim sName As String
sName = Cst.Name
  
  Dim Dime As Object
  Set Dime = Cst.Dimension
  
  Dim sParam As String
  sParam = Dime.Name
  
  Dim lValue As Double
  lValue = Dime.Value / 25.4
  icount = icount + 1
  Link_Parameter_to_Dimension sName, sParam, lValue, icount
Else
End If
  
Next i
    

End Sub

Function Link_Parameter_to_Dimension(sName As String, sParam As String, lValue As Double, ByVal icount As Integer)

Dim oPart As Part
Set oPart = CATIA.ActiveDocument.Part

Dim D1Name As Object
Set D1Name = oPart.FindObjectByName(sName)

Dim D1 As RealParam

If icount = 1 Then
Set D1 = oPart.Parameters.CreateReal("Radius", lValue)
Else

End If

Dim oRelations As Relations
Set oRelations = oPart.Relations

Dim Param As Parameters
Set Param = oPart.Parameters.SubList(D1Name, True)
 
Dim sBodyFormula As String

sBodyFormula = "(" & "Radius" & "*1in)"

Dim oFormula As Formula
Set oFormula = oRelations.CreateFormula("", "", Param.Item(1), sBodyFormula)

End Function 

Link all sketch radius to single parameter.. just be careful with the value of the radius.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources