Mechanical Design

3D Functional Tolerancing & Annotation

Browsing a Toleranced Model

Accessing and reading tolerancing information
Use Case

Abstract

This article discusses the CAABrowseTolerances use case. This use case explains how to browse and read tolerances defined in a CATIA V5 document.

  1. What You Will Learn With This Use Case
  2. How To Browse The Document :

What You Will Learn With This Use Case
This use case is intended to help you to browse a V5 document and obtain properties on 3D annotations.

How To Browse the document
    - The way to get annotations' sets.
        The first thing you must to do is to obtain the document :

Your document is a CATPart

Your document is a CATProduct

Your document is a CATProcess

Set PartDoc = CATIA.ActiveDocument
Set Part = PartDoc.Part
Set AnnotationSets = Part.AnnotationSets
Set ProductDoc = CATIA.ActiveDocument
Set AnnotationSets = ProductDoc.Product.GetTechnologicalObject("CATAnnotationSets")
Set ProcessDoc = CATIA.ActiveDocument
Set AnnotationSets = ProcessDoc.GetItem("CATAnnotationSets")

[Top]

    - The way to browse an annotations' set.

For IdxSet = 1 To AnnotationSets.Count
    Set AnnotationSet = AnnotationSets.Item(IdxSet)
    Set Annotations = annotationSet.Annotations
    .....
Next

    - How to obtain an annotation in an annotations' set.

For IdxAnnot = 1 To Annotations.Count
    Set annotation = annotations.Item(IdxAnnot)
    ....
Next

    [Top]

    - The way to get properties on an annotation.
        Some properties are available for all 3D annotations (you can find it on the left column in the model graph) as for example :
        + Name
        + SuperType
        + TPSStatus
        ....
        The others are available only for some 3D annotations, so you must use the first function (ISA... or HASA...) And if the answer is true, you can get the properties on this interface.

Set AnnotationName = annotation.Name

annotSuperType = annotation.SuperType
annotType = annotation.Type

Select Case annotSuperType    #### All SuperType and Type are available in 3D Functional Tolerancing & Annotation Reference  ####
    Case "FTA_NonSemantic"
        Select Case annotType
        Case "FTA_Text"
        Set Text = annotation.Text.Text & sLF
    Case "FTA_Roughness"
        Set Applicability = annotation.Roughness.Applicability
        Set Obtention = annotation.Roughness.Obtention
        Set Field1 = annotation.Roughness.Field(1)
        .....
        Set Field7 = annotation.Roughness.Field(7) 
    End Select
End Select

If annotation.IsAToleranceUnitBasisValue Then
    Dim dValue1 As Double
    Dim dValue2 As Double
    annotation.ToleranceUnitBasisValue.Values dValue1, dValue2
End If

If annotation.HasAFreeState Then
    Set FreeStateModifier = annotation.FreeState.Modifier
End If

 [Top]


History
Version: 1 [Feb 2003] Document created

[Top]


Copyright © 2003, Dassault Systèmes. All rights reserved.