top of page

Nip-activity - Catia -

Note: A full coding tutorial requires CAA licensing, but the logic flow is universal.

Objective: Automate the creation of a rectangular pad with fillets.

The Manual Process (Interactive):

The NIP-Activity Script Logic (Pseudo-Code):

' NIP-Activity Example (Conceptual VBA for CATIA)
Sub NIP_RectangularPad()
    ' Set non-interactive mode
    CATIA.NonInteractive = True
' Access document
Dim partDoc As PartDocument
Set partDoc = CATIA.Documents.Add("Part")
Dim part1 As Part
Set part1 = partDoc.Part
' Create reference for XY Plane
Dim xyRef As Reference
Set xyRef = part1.OriginElements.PlaneXY
' Create Sketch
Dim sketch1 As Sketch
Set sketch1 = part1.Sketches.Add(xyRef)
' --- Non-Interactive Geometry Definition ---
' Define Rectangle points (No UI popups)
Dim factory2D As Factory2D
Set factory2D = sketch1.OpenEdition()
Dim rect As 2DShape
' Coordinates: (0,0), (100,0), (100,50), (0,50)
Set rect = factory2D.CreateClosedRectangle(0, 0, 100, 50)
factory2D.CloseEdition
' Update sketch
part1.UpdateObject (sketch1)
' --- Non-Interactive Pad ---
Dim pad1 As Pad
Set pad1 = part1.ShapeFactory.AddNewPadFromRef(sketch1, 20)
' --- Non-Interactive Fillet ---
' Collect edges automatically (Assume all vertical edges)
Dim edgesToFillet As Collection
' ... logic to find edges ...
Dim fillet1 As EdgeFillet
Set fillet1 = part1.ShapeFactory.AddNewEdgeFillet(pad1.Body)
Call fillet1.AddRadius(5, edgesToFillet)
' Final Update
part1.Update
partDoc.SaveAs "C:\Output\Part_NIP.CATPart"
' Re-enable interactive mode
CATIA.NonInteractive = False

End Sub

NIP-Activity operates headlessly. It bypasses the graphical user interface entirely. It reads a pre-defined instruction set (via a .CATNip file or CAA-based code) and executes the geometric operation using strictly defined parameters. It does not require CATIA to be visible on screen, nor does it require a mouse cursor. NIP-Activity - Catia

Key Benefits of NIP-Activity:

Because you can't "see" what went wrong, NIP troubleshooting relies entirely on logs. Note: A full coding tutorial requires CAA licensing,

| Error | Likely Cause | Solution | |-------|--------------|----------| | 0x80004005 (Unspecified error) | The macro uses a GUI method (e.g., Selection.SelectElement2) | Rewrite the macro to use non-interative methods or hardcoded names. | | CATIA cannot be started | License server unavailable or incorrect environment | Run CATIA -env check. Ensure a batch license (e.g., MD2, HD2) is available. | | File not found | Relative path used | Convert all paths to absolute. Use CATIA.FileSystem.GetAbsoluteName. | | Process hangs indefinitely | A modal dialog is waiting (e.g., "Do you want to save changes?") | Add CATIA.DisplayAlerts = False at the start of your macro. |

bottom of page