Difference between pages "SelSurfDup" and "SelectElement3 Values"

From scripting
(Difference between pages)
Jump to: navigation, search
(Created page with " Sub SelSurfDup(SurfArr As Variant) Dim SecArr() ReDim SecArr(0) For X = 0 To UBound(SurfArr) If HasArea(SurfArr(X)) Then Dim CMeas Set CMeas = The...")
 
(Created page with "Values to use as selection filter. Role: Values which can be given as filter to Selection.SelectElement2, Selection.SelectElement3, Selection.IndicateOrSelectElement2D or Sele...")
 
Line 1: Line 1:
Sub SelSurfDup(SurfArr As Variant)
+
Values to use as selection filter.
Dim SecArr()
+
Role: Values which can be given as filter to Selection.SelectElement2, Selection.SelectElement3, Selection.IndicateOrSelectElement2D or Selection.IndicateOrSelectElement3D, beside the automation object names.
ReDim SecArr(0)
+
Values:
 
For X = 0 To UBound(SurfArr)
 
    If HasArea(SurfArr(X)) Then
 
        Dim CMeas
 
        Set CMeas = TheSPAWorkbench.GetMeasurable(SurfArr(X))
 
        Dim CPerimeter As Double
 
        CPerimeter = CMeas.Perimeter
 
        Dim CArea As Double
 
        CArea = CMeas.Area
 
        Dim CCOG(2)
 
        CMeas.GetCOG CCOG
 
       
 
        For Y = X + 1 To UBound(SurfArr)
 
            If HasArea(SurfArr(Y)) Then
 
                Dim NMeas
 
                Set NMeas = TheSPAWorkbench.GetMeasurable(SurfArr(Y))
 
                Dim NPerimeter As Double
 
                NPerimeter = NMeas.Perimeter
 
                Dim NArea As Double
 
                NArea = NMeas.Area
 
                Dim NCOG(2)
 
                NMeas.GetCOG NCOG
 
               
 
                If NPerimeter = CPerimeter And CArea = NArea And NCOG(0) = CCOG(0) And NCOG(1) = CCOG(1) And  NCOG(2) = CCOG(2) Then
 
                    Set SecArr(UBound(SecArr)) = SurfArr(Y)
 
                    ReDim Preserve SecArr(UBound(SecArr) + 1)
 
                End If
 
            End If
 
        Next Y
 
    End If
 
Next X
 
 
For Z = 0 To UBound(SecArr) - 1
 
    MyHSFactory.DeleteObjectForDatum SecArr(Z)
 
Next Z
 
End Sub
 
  
 +
ZeroDim
 +
Topological 0-D entity (such as a Point2D )
  
 +
MonoDim
 +
Topological 1-D entity which cannot be infinite (such as a HybridShapeSpline)
  
[[Category:CATIA DP VB]]
+
MonoDimInfinite
 +
Topological 1-D entity which may be infinite, such as a HybridShapeSpline (not infinite) or a HybridShapeLinePtDir for which a call to HybridShapeLinePtDir.GetLengthType would give 1, 2 or 3 (infinite)
 +
 
 +
RectilinearMonoDim
 +
1-D entity which cannot be infinite, the entity having a rectilinear geometry
 +
 
 +
RectilinearMonoDimInfinite
 +
1-D entity which may be infinite, the entity having a rectilinear geometry
 +
 
 +
BiDim
 +
Topological 2-D entity which cannot be infinite (such as a HybridShapeCylinder )
 +
 
 +
BiDimInfinite
 +
Topological 2-D entity which may be infinite, such as a HybridShapeCylinder (non infinite) or a HybridShapePlaneOffsetPt (infinite)
 +
 
 +
PlanarBiDim
 +
2-D entity which cannot be infinite, the entity having a planar geometry
 +
 
 +
PlanarBiDimInfinite
 +
2-D entity having a planar geometry
 +
 
 +
CylindricalBiDim
 +
2-D entity which cannot be infinite, the entity having a cylindrical geometry
 +
 
 +
TriDim
 +
Topological 3-D entity (such as a Pad )
 +
 
 +
 
 +
 
 +
Thanks to this forum post: http://www.catiav5forum.de/wbb3/wbb/index.php?page=Thread&threadID=2167&l=4

Revision as of 19:59, 24 April 2017

Values to use as selection filter. Role: Values which can be given as filter to Selection.SelectElement2, Selection.SelectElement3, Selection.IndicateOrSelectElement2D or Selection.IndicateOrSelectElement3D, beside the automation object names. Values:

ZeroDim Topological 0-D entity (such as a Point2D )

MonoDim Topological 1-D entity which cannot be infinite (such as a HybridShapeSpline)

MonoDimInfinite Topological 1-D entity which may be infinite, such as a HybridShapeSpline (not infinite) or a HybridShapeLinePtDir for which a call to HybridShapeLinePtDir.GetLengthType would give 1, 2 or 3 (infinite)

RectilinearMonoDim 1-D entity which cannot be infinite, the entity having a rectilinear geometry

RectilinearMonoDimInfinite 1-D entity which may be infinite, the entity having a rectilinear geometry

BiDim Topological 2-D entity which cannot be infinite (such as a HybridShapeCylinder )

BiDimInfinite Topological 2-D entity which may be infinite, such as a HybridShapeCylinder (non infinite) or a HybridShapePlaneOffsetPt (infinite)

PlanarBiDim 2-D entity which cannot be infinite, the entity having a planar geometry

PlanarBiDimInfinite 2-D entity having a planar geometry

CylindricalBiDim 2-D entity which cannot be infinite, the entity having a cylindrical geometry

TriDim Topological 3-D entity (such as a Pad )


Thanks to this forum post: http://www.catiav5forum.de/wbb3/wbb/index.php?page=Thread&threadID=2167&l=4