Workflow Recipes
Copy-paste ready workflows for common APS scenarios. Real-world patterns that you can adapt and customize for your specific use cases.
Quick Start Workflows
Upload β Translate β View
The most common APS workflow: upload a CAD file, translate it, and get the viewer-ready result.
RAPS Commands:
# One-line solution
raps upload-and-translate myfile.dwg
# Or step by step
raps upload myfile.dwg
raps translate myfile.dwg
raps view myfile.dwg What happens:
- 1. File uploaded to OSS bucket
- 2. Translation job submitted
- 3. Progress monitored automatically
- 4. Viewer URLs returned
- 5. Ready to embed in your app!
Batch File Processing
Process multiple files efficiently with rate limiting and progress tracking.
RAPS Commands:
# Process all CAD files in directory
raps batch translate ./cad-files/
# With concurrency control
raps batch translate ./cad-files/ --max-concurrent=3
# Include subdirectories
raps batch translate ./project/ --recursive Features:
- β’ Automatic rate limiting
- β’ Progress tracking
- β’ Retry on failures
- β’ Resume interrupted jobs
- β’ Detailed reporting
Data Extraction Workflows
Extract File Properties
Get metadata, properties, and geometry information from translated models.
# Extract all properties to JSON
raps extract properties myfile.dwg --output=properties.json
# Get specific property types
raps extract properties myfile.dwg --type=metadata,geometry
# Extract to CSV for Excel analysis
raps extract properties myfile.dwg --format=csv --output=report.csv Bill of Materials (BOM) Export
Extract part lists and quantities from assembly models.
# Generate BOM from assembly
raps extract bom assembly.iam --output=bom.xlsx
# Include custom properties
raps extract bom assembly.iam --include-properties="Material,PartNumber,Cost"
# Group by material
raps extract bom assembly.iam --group-by=Material ACC/BIM 360 Workflows
Project File Synchronization
Keep local files in sync with ACC projects and automate version control.
Setup & Sync:
# List available projects
raps account projects
# Sync project to local directory
raps sync project-123 ./local-project/
# Watch for changes (continuous sync)
raps sync project-123 ./local-project/ --watch Automation Options:
- β’ Two-way synchronization
- β’ Conflict resolution
- β’ Version history tracking
- β’ Selective file filtering
- β’ Webhook notifications
Automated Model Publishing
Automatically publish and translate models when they're updated in ACC.
# Set up automated publishing for a project
raps workflow create auto-publish \
--project=project-123 \
--trigger=file-updated \
--action=translate
# Check workflow status
raps workflow status auto-publish
# View processing logs
raps workflow logs auto-publish CI/CD & Automation
GitHub Actions Workflow
Automatically process CAD files when they're committed to your repository.
# .github/workflows/cad-processing.yml
name: Process CAD Files
on:
push:
paths: ['**.dwg', '**.step', '**.rvt']
jobs:
process:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dmytro-yemelianov/raps-action@v1
- name: Process changed CAD files
run: |
raps batch translate ./changed-files/
raps generate thumbnails ./changed-files/
env:
APS_CLIENT_ID: ${{ secrets.APS_CLIENT_ID }}
APS_CLIENT_SECRET: ${{ secrets.APS_CLIENT_SECRET }} Jenkins Pipeline
Enterprise-grade CAD processing pipeline with Jenkins.
// Jenkinsfile
pipeline {
agent any
stages {
stage('CAD Processing') {
steps {
script {
sh 'raps auth login'
sh 'raps batch translate ./cad-files/ --max-concurrent=5'
sh 'raps extract properties ./cad-files/ --format=json'
}
}
}
stage('Generate Reports') {
steps {
sh 'raps generate report --format=html --output=reports/'
}
}
}
post {
always {
publishHTML([
allowMissing: false,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'reports',
reportFiles: 'index.html',
reportName: 'CAD Processing Report'
])
}
}
} Advanced Workflow Patterns
Robust Error Handling
Production-ready workflows with comprehensive error handling and recovery.
# Retry failed translations with exponential backoff
raps translate myfile.dwg \
--retry-attempts=5 \
--retry-delay=30s \
--retry-on-rate-limit
# Validate files before processing
raps validate ./input-files/
raps translate ./input-files/ --skip-invalid
# Comprehensive logging
raps translate ./files/ \
--log-level=debug \
--log-file=processing.log \
--progress-file=progress.json Webhook Integration
Integrate RAPS with your existing systems using webhooks and callbacks.
# Send webhook on completion
raps translate myfile.dwg \
--webhook-url=https://api.myapp.com/cad-complete \
--webhook-auth="Bearer $API_TOKEN"
# Custom webhook payload
raps translate myfile.dwg \
--webhook-url=https://api.myapp.com/notify \
--webhook-data='{"project":"123","user":"john.doe"}' Performance Optimization
Optimize processing speed and resource usage for large-scale operations.
# Optimize for speed
raps batch translate ./files/ \
--max-concurrent=10 \
--region=US \
--cache-enabled \
--skip-thumbnails
# Optimize for cost (slower but cheaper)
raps batch translate ./files/ \
--max-concurrent=2 \
--compress-uploads \
--delete-source-after-translation
# Monitor resource usage
raps batch translate ./files/ \
--metrics-enabled \
--metrics-endpoint=https://metrics.myapp.com/ Ready-to-Use Scripts
Daily Backup Script
#!/bin/bash
# daily-backup.sh
DATE=$(date +%Y%m%d)
BACKUP_DIR="./backups/$DATE"
# Download all project files
raps sync project-123 "$BACKUP_DIR"
# Create thumbnails for quick preview
raps generate thumbnails "$BACKUP_DIR"
# Compress for storage
tar -czf "backup-$DATE.tar.gz" "$BACKUP_DIR"
echo "Backup completed: backup-$DATE.tar.gz" Quality Check Pipeline
#!/bin/bash
# quality-check.sh
FILE=$1
# Validate file structure
if raps validate "$FILE"; then
echo "β File validation passed"
else
echo "β File validation failed"
exit 1
fi
# Attempt translation
if raps translate "$FILE" --timeout=300s; then
echo "β Translation successful"
# Extract properties for analysis
raps extract properties "$FILE" \
--output="$FILE.properties.json"
echo "β Quality check completed"
else
echo "β Translation failed"
exit 1
fi Workflow Best Practices
Performance:
- β’ Use appropriate concurrency limits
- β’ Enable caching for repeated operations
- β’ Choose optimal regions for your users
- β’ Monitor rate limits and adjust accordingly
Reliability:
- β’ Always validate files before processing
- β’ Implement comprehensive error handling
- β’ Use retry logic with exponential backoff
- β’ Log everything for debugging