CATTPSBasicDim.GetRepresentationStrings()CATTPSCoordDim.GetRepresentationStrings()CATTPSFlagNote.GetRepresentationStrings()CATTPSNoa.GetRepresentationStrings()CATTPSReferenceFrame.GetRepresentationStrings()CATTPSRoughness.GetRepresentationStrings()CATTPSSet.ApplyViewReUseWhenCopySetTo()CATTPSSet.RepairDeleteInvalidFTAFeatures()Repairs and deletes invalid FTA features. This operation is performed on all the FTA features contained in an annotation set. Arguments
ReturnTypeBoolean Example// Get the annotation set to clean Let TPSSet (CATTPSSet) // Assign the clean-up option as a compound value of possible facet. // For instance, to repair User Surface with 1 valid component at least (2), // and complement this previous run with removal of FTA Feature having at // least one broken geometrical link (16), express the option as the sum of // 2 + 16 = 18. Let RepairOrDeleteOption( Integer ) RepairOrDeleteOption = 18 // Invoke the clean-up handling if ( TPSSet.RepairDeleteInvalidFTAFeatures( RepairOrDeleteOption )) { // Error handling ... } // Notice that applying 1 as option value allows to run the method without // impacting the annotation set; this could be useful in loop treatment // to let one set free of any change CATTPSText.GetRepresentationStrings()CATTPSUndefinedEdgeSymbol.GetRepresentationStrings()CATTPSView.AddPlaneAssociativity()CATTPSViewText.GetRepresentationStrings()CATTPSWeld.GetRepresentationStrings()TPSDatumAnnot.GetRepresentationStrings()TPSDimensionAnnot.GetRepresentationStrings()TPSGeometricalAnnot.GetRepresentationStrings()CATTPSAllAnnotations.GetNbrOfGeometricalComponent()Gets the number of geometrical components. This call returns the number of geometrical components employed by the annotation. When one geometrical component is involved several times to point out underlying geometry, this call sends back the sum of each individual object (one geometrical component being used twice with the annotation is counted as one). This result determines the legal range of variation of the index to pass to the related calls, GetGeometricalComponentName, and SetGeometricalComponentName. SignatureCATTPSAllAnnotations.GetNbrOfGeometricalComponent(ListOfRepStringsValueOutput : List) : Boolean ReturnTypeBoolean Example// Considered annotation Let Annot (CATTPSAllAnnotations) // Read the total number of different geometrical components if ( Annot.GetNbrOfGeometricalComponent( ) <= -1 ) { // Error handling ... } // Script can continue using a range of index between 1 to Annot.GetNbrOfGeometricalComponent ... CATTPSAllAnnotations.GetGeometricalComponentName()Gets the geometrical component name at given index. SignatureCATTPSAllAnnotations.GetGeometricalComponentName(Index : Integer, GeometricalComponentName : String) Arguments
ReturnTypeBoolean Example// Considered annotation Let Annot (CATTPSAllAnnotations) // Retrieve the number of geometrical components Let NbrOfGeometricalCmp(Integer) NbrOfGeometricalCmp = Annot.GetNbrOfGeometricalComponent( ) // Error management if ( NbrOfGeometricalCmp <= -1 ) { // Error handling ... } // Following lines are showing how to dump geometrical component names Let GeometricalComponentName (String) Trace(1,\"_ List of the geometrical component(s) for annotation: #\", Annot.Name ) for Index = 1 while Index <= NbrOfGeometricalCmp { if ( Annot.GetGeometricalComponentName( Index, GeometricalComponentName ) <> true ) { // Error handling ... } else { Trace(2,\"Name of geometrical component at index # is:\", Index, GeometricalComponentName ) } } CATTPSAllAnnotations.SetGeometricalComponentName()Specifies the geometrical component name at given index. It renames the geometrical component using the provided characters string. The system retrieves the geometrical component using the index whose legal value is comprised between 1 and N, N being the maximum bound for the range of indexes and corresponds to the outcome of call to GetNbrOfGeometricalComponent. During this processing, an optional confirm about the applied naming uniqueness can be triggered. The automatic renaming is yet another possibility when you specify a null index. On error, the renaming processing stops without any change. This happens when an already existing name is passed to this method or when automatic processing faces naming ambiguity. SignatureCATTPSAllAnnotations.SetGeometricalComponentName(Index : Integer, NewName String, CheckNameUnicityOption: Boolean) : Boolean Arguments
ReturnTypeBoolean Example// Considered annotation Let Annot (CATTPSAllAnnotations) // Differenciate automatic renaming from individual renaming Let AutomaticMode (Boolean) ... // Renaming processing if ( AutomaticMode == false ) { // Arguments preparation. // Retrieve the number of geometrical components Let NbrOfGeometricalCmp(Integer) NbrOfGeometricalCmp = Annot.GetNbrOfGeometricalComponent( ) // Error management for this scenario (1st item renaming) if ( NbrOfGeometricalCmp < 1 ) { // Error handling ... } // Apply renaming of the first component Let GeomComponentNewName (String) GeomComponentNewName = \"New name For First Geometrical Component\" // Let's run this processing without name uniqueness checking // Beneath to the last argument being optional in signature specification, this call only uses 2 formal inputs if ( Annot.SetGeometricalComponentName( 1, GeomComponentNewName ) <> true ) { // Error handling ... } } else { // Let's run into the automatic renaming with uniqueness checking // In this case the second argument to specify the new name is useless if ( Annot.SetGeometricalComponentName( 0, \"\", true ) <> true ) { // Error handling ... } } |