$MaxConcurrent = 4 $JobList = Get-Content "C:\FileLists\jobs.txt" foreach ($Job in $JobList) while ((Get-Process "CATIA_NIR" -ErrorAction SilentlyContinue).Count -ge $MaxConcurrent) Start-Sleep -Seconds 10
' --- Clean up --- oDoc.Close oLogFile.WriteLine "[" & Now & "] Process completed." oLogFile.Close NIP-Activity - Catia
Introduction In the fast-paced world of 3D design and product lifecycle management, efficiency is paramount. For advanced users of CATIA (Computer-Aided Three-dimensional Interactive Application), time spent on repetitive, non-creative tasks is a direct drain on productivity. Enter NIP-Activity (Non-Interactive Process Activity). This powerful, often underutilized feature allows designers, engineers, and automation specialists to run CATIA scripts and macros without the need for a full graphical user interface (GUI). This article delves deep into what NIP-Activity is, why it matters, how to implement it, and best practices for leveraging it in high-volume production environments. What is NIP-Activity in CATIA? NIP-Activity stands for Non-Interactive Process Activity . In the context of Dassault Systèmes’ CATIA V5 and V6 (now part of the 3DEXPERIENCE platform), NIP-Activity refers to a mode of executing CATIA sessions that do not require user interaction. Unlike a standard interactive session where the user sees the full CATIA window, manipulates models with a mouse, and responds to dialog boxes, an NIP session runs in the background. $MaxConcurrent = 4 $JobList = Get-Content "C:\FileLists\jobs
' --- Open the document --- Set oDoc = CATIA.Documents.Open(strInputFile) If oDoc Is Nothing Then oLogFile.WriteLine "ERROR: Could not open " & strInputFile oLogFile.Close Exit Sub End If NIP-Activity stands for Non-Interactive Process Activity
oDoc.Export oOutputFile, "STEP" oLogFile.WriteLine "Exported to: " & strOutputFile
| 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. | With the shift to Dassault’s 3DEXPERIENCE platform, NIP-Activity has evolved. The concept now includes Batch Dashboards and MQL (Matrix Query Language) scripts on the server side. Instead of CATIA_NIR.exe , you use 3DEXPERIENCE Batch Services .
Set oDoc = Nothing Set oPart = Nothing End Sub One of the most powerful applications of NIP-Activity is parallel processing. Because NIP sessions have a low overhead, you can launch multiple instances simultaneously. Using a Batch Script for Parallel Execution @echo off set MACRO_PATH=C:\NIP_Macros\ProcessPart.CATScript set INPUT_LIST=C:\FileLists\parts.txt for /f "tokens=*" %%i in (%INPUT_LIST%) do ( start /min CATIA_NIR.exe -batch -macro "%MACRO_PATH%" -arg "%%i" -log "C:\Logs%%~ni.log" timeout /t 2 /nobreak >nul ) echo All NIP processes launched.