> For the complete documentation index, see [llms.txt](https://docs.dietrichs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dietrichs.com/tutorials/tutorials-en/building-in-dietrichs/builders-journey/sorting-numbers-detailed-draft..md).

# Sorting Numbers - Detailed - Draft.

## Complete Guide to Sorting Numbers in Dietrich's Software

### Background: Understanding Sorting Numbers

#### What Are Sorting Numbers?

**Sorting numbers** (in German: "Sortier-Nummer" or "laufende Nummer") are component TYPE identification numbers assigned to timber construction components in Dietrich's software. They serve as the primary reference system for tracking component types throughout the entire production and construction process.

**Key Concept:** One sorting number represents one component TYPE, which typically includes multiple identical physical pieces. Think of sorting numbers like SKUs or part numbers in a catalog - "Sorting #1" might represent 50 identical rafters, all sharing the same sorting number.

**Terminology Note:** Throughout this document, we use "Sorting #1" or "Sorting Number 1" for consistency. In practice, you may see this written as "Component #1", "Part #1", or "Component Number 1" on labels, drawings, and in conversation - these all refer to the same thing: Sorting Number 1.

***

### Sorting Number vs. Item Number: Understanding the Difference

#### **Critical Distinction**

Before diving deeper into sorting numbers, it's essential to understand how they differ from **Item Numbers**, as these two concepts are often confused but serve completely different purposes.

| Aspect                       | **Sorting Number**                                                    | **Item Number**                                                     |
| ---------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Purpose**                  | Identifies **component TYPES** in your project (like SKU/Part Number) | Identifies the **material/product specification** from the database |
| **What it answers**          | "Which component TYPE is this?" (one number = many identical pieces)  | "What is this component made of?"                                   |
| **Example Values**           | Sorting #1 (50 pcs), Sorting #2 (30 pcs), Sorting #100 (20 pcs)       | "OSB/3 22mm", "Pine 45x120", "Glulam GL24h"                         |
| **Quantity per number**      | Multiple identical pieces share the same number                       | All pieces with that material specification                         |
| **Generated by**             | Sorting function (automatic or manual)                                | Selected from Material Database                                     |
| **When assigned**            | During sorting process (at end of design)                             | During component input (at creation)                                |
| **Scope**                    | Project-specific (unique to this building)                            | Database-wide (consistent across all projects)                      |
| **Changes between projects** | Yes, completely different for each project                            | No, same materials available in every project                       |
| **Used for**                 | Component TYPE tracking, production programs, batch identification    | Material specifications, ordering, cost calculation                 |

#### **Simple Analogy**

Think of the difference this way:

🏭 **Manufacturing/Retail (BEST analogy):**

* **Sorting Number** = SKU / Part Number (P/N-12345 = "Blue Widget Type A", you have 50 units with this same SKU)
* **Item Number** = Material Specification (Made from "Aluminum 6061" or "Steel Grade 304")

📦 **In a warehouse:**

* **Sorting Number** = Product SKU (SKU-789 = 100 identical hammers on shelf)
* **Item Number** = Material Composition (Steel head, wood handle)

🍕 **In a restaurant kitchen:**

* **Sorting Number** = Recipe Number (Recipe #5 = Margherita Pizza, made 20 times tonight)
* **Item Number** = Ingredient Specification (Type of mozzarella used in the recipe)

🏢 **In a company:**

* **Sorting Number** = Job Role/Department (many employees share: "Level 2 Engineer" - 15 people)
* **Item Number** = Required Qualification (e.g., "Engineering Degree" or "MBA")

#### **Detailed Comparison**

**Sorting Number**

**What it is:**

* A sequential number (1, 2, 3, ...) that identifies each **component TYPE** in your project
* **Data type: Integer** (whole number only)
* **One sorting number = many identical physical pieces** (like a SKU or part number)
* Identical components share the same sorting number
* Generated during the sorting process

**Critical Understanding:**

* If you have 50 identical rafters → **ALL 50 get the same sorting number** (e.g., Sorting #1)
* It's a "component type identifier," not an individual piece identifier
* Think of it like a catalog part number where one P/N covers multiple units

**Real-world example in a building project:**

```
Building Project contains:

Sorting #1 = Rafter Type A
  → 50 identical pieces (all 50 labeled "Sorting #1")
  → 2500mm long, standard end cuts
  
Sorting #2 = Rafter Type B
  → 30 identical pieces (all 30 labeled "Sorting #2")
  → 2500mm long, angled end cuts
  
Sorting #3 = Ridge Beam Type
  → 1 piece (labeled "Sorting #3")
  → 8000mm long, special connections
  
Sorting #100 = Purlin Type A
  → 20 identical pieces (all 20 labeled "Sorting #100")
  → 3600mm long, standard cuts

Sorting #101 = Purlin Type B
  → 15 identical pieces (all 15 labeled "Sorting #101")
  → 4200mm long, beveled cuts
```

**Purpose:**

* Track component **TYPES** through production workflow
* Organize machine files by component type (one program per sorting number)
* Create assembly sequences (install all of Component #1, then all of #2)
* Generate production plans (cut 50 pieces according to Sorting #1 specifications)
* Label batches of identical components for delivery and installation

**Item Number**

**What it is:**

* A material specification code from your Material Database
* **Data type: String** (text with letters, numbers, spaces, special characters)
* Describes **what material** the component is made from
* Includes specific product details, grades, and dimensions
* Remains consistent across all projects using that material

**Real-world example in Material Database:**

```
Material Database contains:
- "OSB/3 15mm" (supplier order #12345)
- "OSB/3 22mm" (supplier order #12346)
- "Pine KVH 60x80" (supplier order #23456)
- "Glulam GL24h 200x400" (supplier order #34567)
- "Spruce C24 45x120" (supplier order #45678)
```

**Purpose:**

* Material ordering and procurement from suppliers
* Cost calculation and budgeting
* Material lists for suppliers and purchasing
* Quality specifications and compliance
* Machine parameter selection (cutting speeds, tool types)

#### **How They Work Together: Practical Examples**

**Example 1: Wall Studs**

**Item Number:** "Spruce C24 45x120"\
\&#xNAN;*(Material specification - spruce lumber, grade C24, 45mm x 120mm cross-section)*

**Sorting Numbers:** 1, 2, 3, 4, 5\
\&#xNAN;*(Five different configurations/lengths of studs in the project)*

**What happens during the workflow:**

1. **Design Phase:**
   * You input wall studs using item number "Spruce C24 45x120"
   * 30 studs are 2.5m long with standard end cuts
   * 20 studs are 2.5m long with window opening cuts
   * 15 studs are 3.0m long with standard end cuts
2. **Sorting Phase:**
   * System analyzes all components
   * 30 identical 2.5m standard studs → All get **Sorting #1**
   * 20 identical 2.5m window studs → All get **Sorting #2**
   * 15 identical 3.0m standard studs → All get **Sorting #3**
3. **Material List Output:**

```
Sorting #  | Item Number         | Quantity | Length | Description
-----------|---------------------|----------|--------|--------------------
1          | Spruce C24 45x120   | 30       | 2500mm | Wall stud standard
2          | Spruce C24 45x120   | 20       | 2500mm | Wall stud w/window
3          | Spruce C24 45x120   | 15       | 3000mm | Wall stud tall
```

**How it's used:**

* **Purchasing** uses Item Number "Spruce C24 45x120" to order the right material
* **Production** uses Sorting Numbers 1, 2, 3 to run the correct machining programs
* **Assembly crew** uses Sorting Numbers to identify which studs go where

**Example 2: Roof Panels with Replacement Item Numbers**

**Original Item Number:** "OSB"\
\&#xNAN;*(General specification during design - you know it's OSB but not the exact thickness yet)*

**Replacement Item Numbers (assigned during sorting):** "OSB/3 22mm" or "OSB/3 15mm"\
\&#xNAN;*(Specific materials - assigned automatically based on actual panel thickness)*

**Sorting Numbers:** 50, 51, 52\
\&#xNAN;*(Three different panel sizes/shapes in the project)*

**What happens during the workflow:**

1. **Design Phase:**
   * You design roof using generic "OSB" item number
   * Different areas have different thickness requirements
   * Panel shapes vary based on roof geometry
2. **Sorting Phase:**
   * System analyzes actual component dimensions
   * Panels that are 22mm thick → Item number becomes "OSB/3 22mm"
   * Panels that are 15mm thick → Item number becomes "OSB/3 15mm"
   * Different panel shapes get different sorting numbers
3. **Material List Output:**

```
Sorting #  | Item Number    | Quantity | Size        | Description
-----------|----------------|----------|-------------|------------------
50         | OSB/3 22mm     | 10       | 2500x1250mm | Roof panel type A
51         | OSB/3 22mm     | 8        | 2500x1000mm | Roof panel type B
52         | OSB/3 15mm     | 15       | 1250x1250mm | Soffit panel
```

**How it's used:**

* **Purchasing** orders two different materials: "OSB/3 22mm" and "OSB/3 15mm"
* **Production** runs three different cutting programs: #50, #51, #52
* **Installation** follows assembly drawings referencing sorting numbers

#### **In the User Interface**

When you select a component in Dietrich's, you might see this in Object Info:

```
Sorting Number: 25
Item Number: OSB/3 22mm [OSB]
Beam Type: 851 (Panel)
Dimensions: 2500 x 1250 x 22mm
```

**Translation:**

* **Sorting Number 25** = This is component type Sorting #25 in your project
* **Item Number: OSB/3 22mm** = The specific material (replacement item number)
* **\[OSB]** = The original general specification used during design
* When displayed with replacement, original shows in square brackets

#### **Production Workflow: Step-by-Step**

**Phase 1: Design**

```
✅ Assign Item Numbers to components (material selection)
   - Select "Pine 45x120" from material database
   - Select "OSB/3" for panels
   - Select "Glulam GL24h 200x400" for beams

❌ Sorting numbers don't exist yet
   - Components have no sequential numbers
   - Cannot generate production files yet
```

**Phase 2: Sorting**

```
✅ Run sorting function
   - System compares all components
   - Identical components grouped together
   - Each unique component type gets a sorting number

✅ System assigns Sorting Numbers
   - Component Type 1: 50 pieces
   - Component Type 2: 30 pieces
   - Component Type 3: 25 pieces

✅ System may assign Replacement Item Numbers
   - "OSB" → "OSB/3 22mm" (based on thickness)
   - "Pine" → "Pine KVH 45x120" (based on grade)
```

**Phase 3: Material Ordering**

```
Material List for Purchasing:

Item Number: Pine 45x120
├─ Sorting #1 → Quantity: 50 pieces @ 2500mm
├─ Sorting #2 → Quantity: 30 pieces @ 3000mm
└─ Sorting #3 → Quantity: 20 pieces @ 2400mm
   Total: Order 100 pieces Pine 45x120

Item Number: OSB/3 22mm
├─ Sorting #10 → Quantity: 25 sheets @ 2500x1250mm
└─ Sorting #11 → Quantity: 15 sheets @ 2500x1000mm
   Total: Order 40 sheets OSB/3 22mm
```

**Purchasing uses:**

* **Item Numbers** to place orders with suppliers
* Quantities are totaled by item number
* Different sorting numbers with same item number = same material order

**Phase 4: Production**

```
Workshop Floor Instructions:

Machine Station 1 (Beam Processor):
- Load material: Pine 45x120
- Run program for Sorting #1 (50 pieces)
- Run program for Sorting #2 (30 pieces)
- Run program for Sorting #3 (20 pieces)

Machine Station 2 (Panel Saw):
- Load material: OSB/3 22mm
- Run program for Sorting #10 (25 sheets)
- Run program for Sorting #11 (15 sheets)
```

**Production uses:**

* **Item Number** → Get correct material from warehouse
* **Sorting Number** → Run specific machining program
* Each sorting number has its own cutting pattern and machining operations

**Phase 5: Labeling and Delivery**

```
Each component is labeled:

┌─────────────────────────┐
│ Sorting #1              │
│ Material: Pine 45x120   │
│ Quantity: 50            │
│ Location: Wall A        │
│ Length: 2500mm          │
└─────────────────────────┘

┌─────────────────────────┐
│ Sorting #10             │
│ Material: OSB/3 22mm    │
│ Quantity: 25            │
│ Location: Roof North    │
│ Size: 2500x1250mm       │
└─────────────────────────┘
```

**Labeling includes:**

* **Sorting Number** (primary identifier)
* **Item Number** (material verification)
* Location information
* Quantity

**Phase 6: On-Site Assembly**

```
Assembly Drawing shows:

Wall A Detail:
- Install 50 pcs of Sorting #1 (Pine 45x120 @ 2500mm)
- Spacing: 625mm o.c.
- Install 30 pcs of Sorting #2 (Pine 45x120 @ 3000mm)
- Around window openings

Roof North Detail:
- Install 25 pcs of Sorting #10 (OSB/3 22mm panels)
- Layout pattern shown in drawing
```

**Construction crew uses:**

* **Sorting Number** → Find correct components on truck/storage
* **Item Number** → Verify they have the right material
* Drawings reference sorting numbers for placement
* Visual verification using item number description

#### **Why Both Are Necessary**

**You MUST have both because they serve different purposes:**

**Sorting Number tells you:**

* ✅ "This is component TYPE Sorting #25 in my project (you have 30 identical pieces)"
* ✅ "All components with Sorting #25 are identical - make 30 pieces exactly the same way"
* ✅ "Machine should run program for Sorting #25 for this batch of 30 pieces"
* ✅ "Load all Sorting #25 pieces together in position A on the truck"
* ✅ "Install all 30 pieces of Sorting #25 in locations shown on drawing"
* ✅ "One sorting number = one component type = multiple identical physical pieces"

**Item Number tells you:**

* ✅ "Order 'OSB/3 22mm' from supplier"
* ✅ "This component costs €15.50 per sheet"
* ✅ "Machine needs OSB-specific tool settings and cutting speed"
* ✅ "Quality control: verify grade and thickness match specification"
* ✅ "This material meets structural requirements"

**Without Sorting Numbers:**

* ❌ Cannot identify which component TYPE is which
* ❌ Production chaos - which machining program for which component type?
* ❌ Assembly confusion - cannot group identical components together
* ❌ No way to reference component types in drawings
* ❌ Cannot organize by component type for efficient production
* ❌ Cannot batch identical pieces together for cutting/machining

**Without Item Numbers:**

* ❌ Cannot order materials from suppliers
* ❌ Cannot calculate project costs
* ❌ No quality specifications
* ❌ Machine doesn't know how to process material
* ❌ Cannot verify correct materials used

#### **Common Scenarios**

**Scenario 1: Same Material, Different Component Types**

```
Item Number: Pine 45x120 (same material for all component types)

Sorting #1: 50 pcs @ 2500mm with standard cuts
           → All 50 pieces labeled "Sorting #1"
           → One component TYPE, 50 identical pieces
           
Sorting #2: 30 pcs @ 2500mm with angled cuts
           → All 30 pieces labeled "Sorting #2"
           → One component TYPE, 30 identical pieces
           
Sorting #3: 20 pcs @ 3000mm with standard cuts
           → All 20 pieces labeled "Sorting #3"
           → One component TYPE, 20 identical pieces
           
Sorting #4: 15 pcs @ 3000mm with mortises
           → All 15 pieces labeled "Sorting #4"
           → One component TYPE, 15 identical pieces

All same MATERIAL (Item Number: Pine 45x120)
All different COMPONENT TYPES (4 different Sorting Numbers)
Total: 4 component types = 4 sorting numbers
Total: 115 physical pieces sharing those 4 sorting numbers
```

**Why?** Same wood material, but different lengths and machining operations = different component types = different sorting numbers. Each sorting number acts like a SKU covering multiple identical pieces.

**Scenario 2: Different Materials, Sequential Sorting Numbers**

```
Sorting #1: Pine 45x120 rafters
           → 40 identical pieces @ 3500mm
           
Sorting #2: Spruce 60x120 purlins
           → 25 identical pieces @ 4200mm
           
Sorting #3: Glulam 200x400 ridge beam
           → 1 piece @ 12000mm
           
Sorting #4: OSB/3 22mm roof panels
           → 60 identical pieces @ 2500x1250mm
           
Sorting #5: OSB/3 15mm soffit panels
           → 30 identical pieces @ 1250x1250mm

All different MATERIALS (different Item Numbers)
All sequential COMPONENT TYPES (5 different Sorting Numbers)
```

**Why?** Each component type gets the next sequential number regardless of material. Different materials, but still organized by component type.

**Scenario 3: Replacement Item Numbers with Multiple Component Types**

```
During Design:
- User selects: "OSB" (generic material specification)
- System doesn't know exact thickness yet

During Sorting:
- System analyzes actual component dimensions
- Assigns specific replacement item numbers based on thickness
- Assigns sorting numbers based on component type (shape, size, machining)

Result in Object Info and Material List:

Sorting #10: OSB/3 22mm [OSB]
            → 25 identical panels @ 2500x1250mm
            → All 25 pieces labeled "Sorting #10"
            
Sorting #11: OSB/3 15mm [OSB]
            → 15 identical panels @ 2500x1250mm
            → All 15 pieces labeled "Sorting #11"
            
Sorting #12: OSB/3 22mm [OSB]
            → 10 identical panels @ 1250x1250mm (different size from #10)
            → All 10 pieces labeled "Sorting #12"
            
Sorting #13: OSB/3 18mm [OSB]
            → 8 identical panels @ 2500x1250mm
            → All 8 pieces labeled "Sorting #13"

Original generic item [OSB] shown in brackets for reference
Specific replacement item numbers used for ordering and production
Different THICKNESSES or SIZES = different component types = different sorting numbers
```

**Why?** Allows flexible design with generic materials, then automatic specification based on actual dimensions. Each unique combination of material specification and geometry gets its own sorting number (component type), which may cover many identical pieces.

#### **Quick Reference Summary**

**🔑 CRITICAL CONCEPT:**

```
ONE Sorting Number = ONE Component TYPE = MANY Identical Pieces

Example: Sorting #1 = 50 identical rafters
         All 50 pieces share Sorting Number "1"
         
Think: SKU or Part Number (one number, multiple units)
NOT: Serial number (unique to each piece)
```

**When someone asks "What's the number?"**

❓ **"What's component number 25?"**\
→ They're asking about the **SORTING NUMBER**\
→ Answer: "That's the type of rafter with the window opening cut"

❓ **"What's the item number for those rafters?"**\
→ They're asking about the **ITEM NUMBER**\
→ Answer: "Pine KVH 45x120"

❓ **"What number do I order from the supplier?"**\
→ They need the **ITEM NUMBER**\
→ Answer: "OSB/3 22mm, supplier code 12346"

❓ **"What number do I run on the machine?"**\
→ They need the **SORTING NUMBER**\
→ Answer: "Run program #25"

❓ **"What number shows on the delivery label?"**\
→ Primary is **SORTING NUMBER**, verified with **ITEM NUMBER**\
→ Answer: "Component #25, Material: Pine 45x120"

#### **Technical Note: How Sorting Compares Components**

When determining if components are identical (and should share a sorting number), the system compares:

**Checked:**

* ✅ Item Number (including replacement item numbers)
* ✅ Dimensions (length, width, height)
* ✅ Machining operations
* ✅ Beam type designation
* ✅ Building element relationships (if configured)

**NOT Checked:**

* ❌ Sorting Number (doesn't exist yet)
* ❌ Component position in building
* ❌ Which floor or wall it belongs to (unless restart sorting configured)

**Result:**

* Components with same item number and all other properties → Same sorting number
* Components with different item number → Different sorting number (even if otherwise identical)
* Components with same item number but different dimensions → Different sorting number

***

### Serial Numbers: What Dietrich's Does NOT Have

#### **Critical Understanding: No Serial Number System**

**Dietrich's does NOT have a serial number system** for tracking individual physical pieces within a batch. This is a fundamental limitation to understand.

**What this means:**

* Sorting numbers identify **component TYPES**, never individual pieces
* If you have 50 identical rafters with Sorting #1, there's no way to distinguish "Rafter #1-001" from "Rafter #1-050"
* All 50 pieces are simply "Sorting #1" - they are interchangeable

#### **Sorting Number vs. Serial Number**

| Aspect                          | **Sorting Number (Exists)** | **Serial Number (Does NOT Exist)** |
| ------------------------------- | --------------------------- | ---------------------------------- |
| **What it identifies**          | Component TYPE              | Individual physical piece          |
| **Quantity per number**         | Multiple identical pieces   | One unique piece                   |
| **Example**                     | Sorting #1 = 50 rafters     | Serial #1-001, #1-002, #1-003...   |
| **Can distinguish individuals** | ❌ No                        | ✅ Yes                              |
| **In Dietrich's**               | ✅ Exists                    | ❌ Does not exist                   |

#### **The One Exception: One-Off Components**

**When Quantity = 1, Sorting Number EFFECTIVELY becomes a Serial Number**

```
Example of Unique Component:

Sorting #3 = Ridge Beam (Unique Component)
  → Quantity: 1 piece
  → 12000mm long, special connections
  → Material: Glulam GL24h 200x600
  
In this case:
- Sorting #3 identifies ONE specific physical beam
- No other beam has Sorting #3
- Sorting #3 effectively acts as a serial number
- This ONE beam can be tracked individually
```

**Label on unique component:**

```
┌─────────────────────────────┐
│ Sorting #3                  │  ← Effectively a serial number
│ Ridge Beam - UNIQUE         │     because there's only ONE piece
│ Material: Glulam GL24h      │
│ Quantity: 1                 │
│ Length: 12000mm             │
│ Weight: 287 kg              │
└─────────────────────────────┘
```

#### **The Normal Case: Batch Identification Only**

**When Quantity > 1, Sorting Number is a BATCH identifier**

```
Example of Batch:

Sorting #1 = Standard Rafter (Batch)
  → Quantity: 50 identical pieces
  → 2500mm long, standard cuts
  → Material: Pine 45x120
  
In this case:
- Sorting #1 identifies the component TYPE
- All 50 rafters are labeled "Sorting #1"
- Cannot distinguish Rafter A from Rafter B
- They are interchangeable pieces
```

**Label on batch components:**

```
┌─────────────────────────────┐
│ Sorting #1                  │  ← Batch identifier
│ Rafter Standard             │     NOT a serial number
│ Material: Pine 45x120       │
│ Quantity: 50                │  ← 50 identical pieces
│ Length: 2500mm              │     all labeled the same
└─────────────────────────────┘
```

#### **Real-World Implications**

**What You CAN Do:**

✅ **Track component types through production:**

* "All pieces of Sorting #1 have been cut"
* "Sorting #1 is loaded on truck 2"
* "Install all Sorting #1 pieces according to plan"

✅ **Track unique components individually:**

```
Sorting #3 (Ridge Beam) - 1 piece
  → Delivered on Truck 1
  → Installed on June 15
  → Location: Grid Line A, Span 1-8
  → This specific beam is fully traceable
```

✅ **Batch tracking:**

```
Sorting #1 (Standard Rafters) - 50 pieces
  → 50 pieces cut on June 10
  → 50 pieces loaded on Truck 2
  → 50 pieces installed June 15-16
  → Batch is traceable, individuals are not
```

**What You CANNOT Do:**

❌ **Track individual pieces within a batch:**

```
Cannot say:
  "Rafter #1-023 is installed at position A-5"
  "Rafter #1-047 has a defect"
  "Where is Rafter #1-012?"

Can only say:
  "Some piece of Sorting #1 is at position A-5"
  "One piece of Sorting #1 has a defect"
  "Sorting #1 rafters are somewhere on site"
```

❌ **Distinguish between identical pieces:**

* If two rafters with Sorting #1 get mixed up, you cannot tell them apart
* They are functionally identical and interchangeable
* No way to trace which specific physical piece went where

❌ **Individual piece history:**

* Cannot track "this specific rafter was cut by Machine A at 10:15am"
* Can only track "all Sorting #1 rafters were cut on June 10"

#### **When You Need Individual Piece Tracking**

If your project requires tracking individual pieces within batches, you need **external systems**:

**Option 1: External Barcode System**

```
Sorting #1 + Sequential Barcode:
  - Sorting #1 - Barcode 0001
  - Sorting #1 - Barcode 0002
  - Sorting #1 - Barcode 0003
  ...
  - Sorting #1 - Barcode 0050

Each piece gets unique barcode applied during production
Scanning system tracks individual pieces through workflow
```

**Option 2: RFID Tagging**

```
Sorting #1 + RFID Tag:
  - Each rafter gets RFID chip
  - Chip stores: Sorting #1, Serial: 001, Cut Date, Machine ID
  - Readers track piece movement through facility and on site
```

**Option 3: Make Pieces Artificially Unique in Dietrich's**

```
Instead of:
  Sorting #1 → 50 identical pieces (cannot distinguish)

Do:
  Sorting #1 → Rafter Position A-1 → 1 piece (traceable)
  Sorting #2 → Rafter Position A-2 → 1 piece (traceable)
  Sorting #3 → Rafter Position A-3 → 1 piece (traceable)
  ...
  Sorting #50 → Rafter Position A-50 → 1 piece (traceable)

Result:
- Each position gets its own sorting number
- Each sorting number = 1 piece = individually traceable
- Downside: 50 sorting numbers instead of 1, much more complex
```

#### **Practical Examples**

**Example 1: Mixed Batch - Cannot Trace Individual Pieces**

**Scenario:**

```
You have 50 identical rafters (Sorting #1)
During transport, 5 rafters fall off truck and get damaged
You replace them with 5 new rafters (also Sorting #1)

Question: Which 5 rafters were replaced?
Answer: Cannot tell - all 50 are identical "Sorting #1"
        No way to distinguish old from new

On site:
- Inspector finds crack in one rafter
- "Which rafter is this? Where did it come from?"
- Answer: "One of the Sorting #1 rafters"
- Cannot trace it back to:
  • Which production batch
  • Which cutting date
  • Which machine
  • Which delivery truck
```

**Example 2: Unique Beam - Can Trace Completely**

**Scenario:**

```
You have 1 main ridge beam (Sorting #3)

Timeline:
- June 5: Ordered from supplier (Order #GL-2024-456)
- June 12: Delivered, inspected, labeled "Sorting #3"
- June 15: Loaded on Truck 1
- June 16: Crane lifted, installed at Grid Line A
- June 20: Final inspection shows small crack

Question: Which beam has the crack? Full history?
Answer: Sorting #3 - can trace back to:
  ✅ Supplier order #GL-2024-456
  ✅ Delivery date and inspection report
  ✅ Truck used for delivery (Truck 1)
  ✅ Installation crew and date (June 16, Crew B)
  ✅ Exact location in building (Grid Line A, Span 1-8)
  ✅ Inspection records
  
Because Sorting #3 = only 1 piece, full traceability exists
```

**Example 3: Partial Batch Usage - Lost Traceability**

**Scenario:**

```
You have 100 studs (Sorting #1)
Phase 1 (June): Use 50 studs in Wall A
Phase 2 (August): Use remaining 50 studs in Wall B

During Phase 2, you discover 3 studs are from defective batch

Question: Which 3 studs? Where are they now?
Answer: Cannot determine:
  ❌ Are the bad studs in Wall A (already built)?
  ❌ Are the bad studs in remaining stock (not yet used)?
  ❌ Which specific studs are affected?
  
All you know: "Some of the Sorting #1 studs are bad"
```

**If this was critical, you should have:**

```
Created two component types:
- Sorting #1 → 50 studs for Wall A (Phase 1)
- Sorting #2 → 50 studs for Wall B (Phase 2)

Then you could determine:
✅ If defect is in Sorting #1 → Wall A is affected
✅ If defect is in Sorting #2 → Only remaining stock affected
```

#### **Design Decision: When to Make Components Unique**

**Make separate sorting numbers (treat as unique) when:**

✅ **Components are structurally critical:**

```
Main beams, ridge beams, engineered trusses
Better: Sorting #3, #4, #5 for 3 unique beams
Worse: Sorting #1 for "3 main beams" (batch)
Reason: Each beam traceable individually
```

✅ **Components have specific installation locations:**

```
If each rafter goes in a pre-planned, specific position:
- Make each position a unique component type
- Each gets own sorting number (Sorting #1 = Position A-1, etc.)
- Each is individually traceable through installation
```

✅ **Regulatory/warranty requirements:**

```
If building codes require component traceability:
- Break batches into individual sorting numbers
- Accept: More sorting numbers, more complexity
- Benefit: Full compliance and traceability
```

✅ **High-value or long-lead items:**

```
Expensive engineered components:
- Custom glulam beams (€5,000 each)
- Engineered floor trusses (€2,500 each)
- Specialized connectors (€800 each)

Worth the overhead of individual sorting numbers
Full tracking from order → delivery → installation
```

✅ **Different production batches or dates:**

```
If cutting 50 rafters across multiple days:
- Day 1: Sorting #1 (25 pieces)
- Day 2: Sorting #2 (25 pieces)

Benefit: Can trace issues to specific production date
Cost: Two sorting numbers instead of one
```

**Keep as batches (shared sorting number) when:**

✅ **Components are truly interchangeable:**

```
Standard studs, joists, blocking, strapping
50 identical pieces can share Sorting #1
No need to distinguish between them
Installation position doesn't matter
```

✅ **High quantity, low individual value:**

```
Hundreds of identical blocking pieces
Cost: €2 per piece
Benefit of individual tracking: Minimal
Overhead of individual tracking: High
Decision: Keep as batch (Sorting #1 = 200 pieces)
```

✅ **Standard production workflow:**

```
All pieces:
- Cut together from same material batch
- Processed on same machine setup
- Shipped together
- Installed in same phase

Batch identity is adequate for quality control
No benefit to individual tracking
```

✅ **Replacement parts readily available:**

```
If a piece is defective:
- Easy to replace with spare
- Not worth complexity of individual tracking
- Batch-level quality control sufficient
```

#### **Summary: Serial Numbers in Dietrich's**

**Key Points:**

1. ❌ **Dietrich's does NOT have serial numbers** for individual pieces within batches
2. ✅ **Sorting numbers identify component TYPES**, not individual pieces
3. ✅ **One-off components (Qty=1):** Sorting number effectively becomes a serial number
4. ❌ **Batches (Qty>1):** Sorting number identifies the type, cannot distinguish individuals
5. 🔧 **Need individual tracking?** Use external systems (barcode, RFID) or make each piece artificially unique
6. ⚖️ **Design decision:** Balance between traceability needs and system complexity

**Remember:**

* **One Sorting Number = One Component TYPE** = Usually many identical pieces
* **For unique/critical components**: Make Qty=1, sorting number = serial number
* **For standard components**: Accept batch-level tracking, sorting number ≠ serial number
* **Choose strategy based on**: Component value, criticality, regulatory needs, replaceability

**When designing your component breakdown:**

```
Ask yourself:
1. Does this component need individual piece tracking?
2. Is the component critical, high-value, or regulated?
3. Are pieces interchangeable or location-specific?
4. What's the cost/benefit of individual vs. batch tracking?

Then decide:
- Individual: Make each piece a unique sorting number (Qty=1)
- Batch: Group identical pieces under one sorting number (Qty>1)
```

***

### Why Are Sorting Numbers Needed?

Sorting numbers are essential for several critical business processes:

#### 1. **Production Organization**

* **Machine File Generation**: CNC machines and automated equipment require unique component identifiers to process the correct parts with the right machining operations
* **Manufacturing Sequence**: Sorting numbers help organize the production flow, ensuring components are manufactured in the optimal order
* **Quality Control**: Each component can be tracked and verified against its sorting number

#### 2. **Documentation and Communication**

* **Material Lists**: Sorting numbers appear in all material lists and cutting lists, enabling precise material ordering and cost tracking
* **Production Plans**: Workshop drawings and assembly plans reference sorting numbers to show which component goes where
* **Assembly Instructions**: Construction crews use sorting numbers to identify and locate components during assembly

#### 3. **Logistics and Delivery**

* **Loading Planning**: Sorting numbers help organize components on delivery vehicles in the correct loading sequence
* **On-Site Assembly**: Components can be unloaded and assembled in the proper order when sorted by number
* **Inventory Management**: Warehouses use sorting numbers to track component locations and shipment status

#### 4. **Efficiency Through Standardization**

* **Identical Components**: Parts that are exactly the same receive the same sorting number, which:
  * Reduces cutting errors by grouping identical components
  * Simplifies inventory management
  * Optimizes material usage
  * Speeds up production by batching identical parts

#### 5. **Component Identification**

* **Unique Reference**: Each different component has its own number, making it easy to reference in conversations, emails, and documentation
* **Version Control**: When components change, their sorting numbers help track which version is current
* **Error Prevention**: Clear numbering prevents mix-ups between similar-looking but different components

***

### When Are Sorting Numbers Created?

#### Automatic Creation Triggers

Sorting numbers are created **automatically** by the system in the following situations:

**1. Before Output Generation**

Sorting is automatically requested whenever you generate:

* **Material lists** for ordering or cost estimation
* **Production plans** for the workshop
* **Machine files** for CNC equipment
* **Assembly drawings** for the construction site
* **Loading plans** for delivery organization

The system detects when components have changed since the last sorting and prompts you to sort before generating these outputs.

**2. After Component Changes**

Whenever you:

* Add new components to the building model
* Modify existing component dimensions, materials, or machining
* Delete or replace components
* Change component properties that affect their identity

The software recognizes that sorting is needed and will prompt you before allowing outputs.

#### Manual Creation

You can also manually trigger sorting at any time by:

* Accessing the sorting function through the **menu**
* Clicking the sorting **icon** in the toolbar
* Using the **keyboard shortcut** (if configured)
* Using the **function number** from the model area

***

### How Are Sorting Numbers Modified?

#### Automatic Modification (Re-sorting)

**When Components Are Modified**

If you change a component that already has a sorting number:

1. The component retains its **original sorting number as a default**
2. During the next sorting operation:
   * If no other different component has this number → **keeps the same number**
   * If there are only identical components with this number → **keeps the same number**
   * If the number is now used by a different component → **receives a new number**

This intelligent system tries to maintain number stability while ensuring accuracy.

**The "Attach" Function (Subsequent Sorting)**

When you add new components to an already-sorted building:

* Use **"Sorting new"** to completely re-sort everything
* Use **"Attaching"** to only number the new components while preserving existing numbers
* The system uses the highest current number as the starting point for new components

#### Manual Modification Scenarios

**1. Changing Start Numbers**

You can modify the starting number for each model area:

* Walls might start at 1
* Roofs might start at 200
* Floors might start at 500

This prevents number overlap between different building sections.

**2. Adjusting Beam Type Number Ranges**

You can define specific number ranges for component types:

* Purlins: 100-140
* Rafters: 141-200
* Plates: 201-300

This makes component types immediately recognizable by their number.

**3. Setting Fixed Numbers**

For components that need permanent, unchanging numbers (see next section), you can manually assign specific sorting numbers.

***

### When Do You Want Fixed Sorting Numbers?

#### What Are Fixed Sorting Numbers?

**Fixed sorting numbers** are permanently assigned numbers that never change during subsequent sorting operations. Components with fixed numbers are excluded from the comparison process.

#### Primary Use Cases

**1. Numbers from External Sources**

**When to use:** The sorting number has been specified elsewhere **Example:**

* Position numbers from structural calculations
* Reference numbers from architectural drawings
* Customer-specified component codes
* Numbers matching existing construction documentation

**Why:** Ensures consistency between Dietrich's and external documentation systems.

**2. Large/Critical Components**

**When to use:** Very large or important components that must maintain their identity **Example:**

* Laminated timber beams (glulam beams)
* Main structural members
* Pre-fabricated trusses
* Special engineered components

**Why:** These components often represent:

* Significant material investment
* Long lead-time orders
* Pre-engineered or pre-fabricated elements
* Building sequence dependencies

Losing their number could cause serious production or delivery problems.

**3. Building Sequence Control**

**When to use:** The number represents a mandatory construction sequence **Example:**

* Foundation components (must be installed first)
* Load-bearing walls before non-load-bearing
* Lower floors before upper floors
* Components with specific installation timing

**Why:** The fixed number becomes a production/installation schedule tool.

**4. Customer Requirements**

**When to use:** The client requires specific numbering schemes **Example:**

* Contract specifications require particular numbering
* Integration with client's project management systems
* Matching existing building phases or sections
* Regulatory or documentation requirements

**Why:** Contractual compliance and customer satisfaction.

#### Important Fixed Number Characteristics

1. **No Comparison**: Components with fixed numbers are never compared to other components during sorting
2. **Number Protection**: No other component can automatically receive a fixed number
3. **Conflict Handling**: If another component already has that number:
   * As a normal number: The other component loses it and gets reassigned
   * As a fixed number: Both keep it (you must verify they're identical)
4. **Scope Awareness**: Fixed numbers respect sorting restart settings (per floor, per wall, etc.)

***

## Tutorial: Using Sorting Numbers in Dietrich's

### Part 1: Basic Automatic Sorting

#### Step 1: Understanding When to Sort

**Before you begin**, recognize that sorting should be done:

* ✅ After completing major component input phases
* ✅ Before generating any production outputs
* ✅ After modifying existing components
* ✅ When preparing for machine file export

**Do NOT sort:**

* ❌ During active component input (wait until a logical break)
* ❌ Multiple times unnecessarily (it doesn't improve results)

#### Step 2: Accessing the Sorting Function

**Option A: From the Menu**

* Navigate to the appropriate menu location
* Select "Sorting" or "Sorting and Labelling"

**Option B: Using the Toolbar Icon**

* Locate the sorting icon in your current model area
* Click the icon to open the sorting dialog

**Option C: Keyboard Shortcut**

* Use your configured shortcut key (check menu for specific key)
* Note: Shortcut won't work if focus is on a checkbox or input field

**Option D: Automatic Prompt**

* Simply try to generate a list, plan, or machine file
* The system will automatically prompt you to sort if needed

#### Step 3: Understanding the Sorting Dialog

The sorting dialog contains **three sub-dialog boxes**:

**Sub-Dialog 1: Sorting Parameters (Main Settings)**

This is where you'll spend most of your time. Key settings include:

**Start Number:**

* Sets the beginning number for this model area
* Example: Walls = 1, Roof = 200, Floor = 400

**Restart Sorting:**

* **Positional**: Numbers restart based on position
* **Floor by Floor**: New number sequence for each floor
* **Wall by Wall**: New number sequence for each wall
* Similar options for floor decks, roofs, roof surfaces, trusses

**Sort According To:**

* Defines the criteria for determining if components are identical
* Options automatically adjust based on "Restart Sorting" setting

**Package/Element Consideration:**

* Can be set separately for each model area
* Determines if building element relationships affect sorting

**Identical Numbers Allowed in Model:**

* **Yes**: Same sorting numbers can exist in different model areas
* **No**: Ensures globally unique numbers across all model areas
  * Prevents problems when generating machine files
  * Automatically sets other options for consistency

**Sub-Dialog 2: Beam Type Dependent Sorting Numbers**

Use this to assign number ranges to specific component types.

**Sub-Dialog 3: Replacement Item Numbers**

For automatic material specification substitution during sorting.

#### Step 4: Performing a Basic Sort

**For First-Time Sorting:**

1. **Open the sorting dialog** using any method from Step 2
2. **Configure basic settings:**

   ```
   Start Number: 1 (or your preferred starting point)
   Restart Sorting: Positional (or your preferred method)
   Sort According To: (Use default unless you have specific needs)
   Identical Numbers in Model: No (recommended for most projects)
   ```
3. **Review model area information**
   * Right side of OK button shows what will be sorted
   * Each model area displays highest number reached
4. **Click OK** to execute the sorting
5. **Review the results dialog:**
   * Start number for each model area
   * Highest sorting number reached
   * Highest beam type dependent number
   * Any warnings about number range conflicts
6. **Click OK** to accept the results

#### Step 5: Verifying Sorting Results

**Visual Inspection:**

* Components should now display their sorting numbers
* Identical components should have the same number
* Different components should have different numbers

**Check Object Info:**

* Select a component
* View its sorting number in the object information display
* Fixed numbers show special text/formatting

**Display Component Information:**

* Turn on sorting number display if not visible
* Numbers can be shown on-screen or in plans

**Generate a Test List:**

* Create a simple material list
* Verify that sorting numbers appear correctly
* Check that identical components are properly grouped

***

### Part 2: Advanced Sorting - Beam Type Dependent Numbers

#### When to Use Beam Type Number Ranges

Use this feature when:

* ✅ You want component types recognizable by their number
* ✅ Different trades work with different component types
* ✅ Production lines handle specific component categories
* ✅ You need to organize machine files by component type

#### Setting Up Beam Type Number Ranges

**Step 1: Access the Sub-Dialog**

* Open the main sorting dialog
* Navigate to the **"Beam Type Dependent Sorting Numbers"** sub-dialog

**Step 2: Define Beam Type Groups**

Each row defines one group with its number range:

**From/To Beam Type:**

* Enter beam type numbers or use the browser button to select
* **Single beam type**: Enter same number in both fields (e.g., 331-331)
* **Range of types**: Enter start and end numbers (e.g., 320-323 for all canted non-rising purlins)

**Sorting Number From/To:**

* Define the number range this beam type group will use
* Example: 100 to 140 for all purlins

**Example Configuration:**

```
Beam Type Group    |  Number Range
-------------------|------------------
320-323            |  100-140    (Canted purlins)
331-331            |  100-140    (Rising purlins - same range OK)
410-419            |  200-299    (Rafters)
851-853            |  400-499    (CLT panels)
500-599            |  500-699    (All other components)
```

**Step 3: Handle Overlapping Ranges**

**Beam Type Overlap:**

* Overlapping beam type groups are allowed
* Component is placed in the **first matching group**
* Useful when not all types occur in every project

**Number Range Overlap:**

* Overlapping number ranges are allowed
* Useful for types that can't be defined as one group
* Example: All tilted purlins in same range requires multiple group entries

**Step 4: Using Icon Buttons**

* **Delete**: Remove a line
* **Move**: Change line order (affects which group matches first)
* **Insert**: Add a new line before current line

**Step 5: Sort and Review**

* Complete the sorting process as normal
* Check the results dialog for "Highest beam type depending sorting number"
* If components fall outside ranges, you'll see a warning message

#### How Beam Type Sorting Works

1. **Identical Component Found:**
   * Component gets the same number as the identical one
   * Guaranteed to be in correct range (beam type is a sorting criterion)
2. **No Identical Component:**
   * Next free number in the defined range is used
   * Number is reserved for this beam type group
3. **No Free Number in Range:**
   * Component gets next free number in model area
   * System avoids numbers used by other beam type groups
   * Warning message displays
4. **Component Not in Any Group:**
   * Cannot receive a number from any defined range
   * Gets normal sequential number

***

### Part 3: Fixed Sorting Numbers

#### Creating Fixed Sorting Numbers

**Important:** This function is only available in the **D-CAM model area**.

**Step 1: Prepare Your Components**

* Ensure the components you want to fix are visible
* Know what numbers you want to assign
* Have your external documentation ready (if applicable)

**Step 2: Access the Fixed Number Function**

* Switch to the **D-CAM** model area
* Locate the fixed sorting number function
* Find the number input box (typically top right of the function)

**Step 3: Assign Fixed Numbers - Method A (Sequential)**

**Use when:** Multiple components need consecutive numbers

1. **Enter the starting number** in the input box
2. **Select all components** that need fixed numbers (in desired order)
3. **Click the top button** (first button option)
4. **Result:**
   * First selected component gets the entered number
   * Each subsequent component gets number +1
   * Example: Enter 50, select 5 components → Numbers 50, 51, 52, 53, 54

**Step 4: Assign Fixed Numbers - Method B (Same Number)**

**Use when:** Multiple components need the same fixed number

1. **Enter the desired number** in the input box
2. **Select all components** that should share this number
3. **Click the second button** (second button option)
4. **Result:**
   * All selected components receive the same fixed number
   * Useful for components you've verified are identical

**Step 5: Handle Conflicts**

**Conflict Type 1: Number already exists as normal sorting number**

* Query appears asking for confirmation
* If you confirm:
  * Your component gets the fixed number
  * The other component loses this number
  * At next sorting, the other component gets a new number

**Conflict Type 2: Number already exists as fixed sorting number**

* Query appears asking for confirmation
* If you confirm:
  * Both components keep the same fixed number
  * **You are responsible** for verifying they are truly identical
  * System won't check this relationship

**Step 6: Verify Fixed Numbers**

**Visual Inspection:**

* Components with fixed numbers show special formatting
* Text is **underlined and bold** in component information display
* Object info shows text before the number indicating it's fixed

**Activate All Fixed Numbers:**

* Use the button to activate/highlight all components with fixed numbers
* Easily verify you've captured all intended components

**Check Sorting Settings:**

* Fixed numbers respect your sorting restart settings
* If sorting restarts per floor, fixed numbers compared only within floor
* Same logic applies for wall-by-wall, roof-by-roof, etc.

#### Removing Fixed Sorting Numbers

**Step 1: Access the Removal Function**

* In D-CAM, locate the fixed number removal button (typically the lowest button)

**Step 2: Select Components**

* **Important:** You can only select components that already have fixed numbers
* Other components cannot be selected

**Step 3: Remove Fixed Status**

* Selected components lose their fixed sorting number status
* The number becomes a normal sorting number

**Step 4: Next Sorting Behavior** At the next sorting:

* If the original fixed number is still free → component keeps it
* If the number is taken → component gets a new number automatically

***

### Part 4: Practical Workflows

#### Workflow 1: Sorting a New Project

**Scenario:** You've just completed the component input for a new building project.

**Steps:**

1. **Review Your Components**
   * Check that all components are correctly entered
   * Verify materials, dimensions, and machining operations
   * Ensure building structure (MOS) is properly organized
2. **Plan Your Number Ranges**

   ```
   Model Area        Start Number
   ----------------  -------------
   Walls             1
   Floor Decks       200
   Roof              400
   D-CAM (misc)      600
   ```
3. **Configure Sorting Settings**
   * Open sorting dialog
   * Set start numbers for each model area
   * Choose restart method (typically "Positional")
   * Set "Identical numbers in model" to "No"
   * Save these settings as a favorite for future use
4. **Execute Sorting**
   * Click OK to sort
   * Review results dialog
   * Note highest numbers reached in each area
5. **Verify Results**
   * Check a few components to confirm numbers are assigned
   * Generate a test material list
   * Verify identical components have same numbers
6. **Generate Production Outputs**
   * Now safe to create machine files, plans, and lists
   * Sorting numbers will appear in all outputs

#### Workflow 2: Adding Components to Sorted Building

**Scenario:** Production has started, but you need to add or modify components.

**Steps:**

1. **Add New Components**
   * Input additional components as needed
   * Don't worry about their numbers yet
2. **Decide: New or Attach?**

   **Choose "Sorting New" if:**

   * Major changes have been made
   * You want to completely re-optimize numbering
   * Many components have been modified or deleted

   **Choose "Attaching" if:**

   * Only a few new components added
   * You want to preserve existing numbers
   * Production is already using current numbers
3. **Execute Attach Sorting**
   * Open sorting dialog
   * Select "Attaching" option (if available)
   * Existing components keep their numbers
   * New components get next available numbers
   * System uses highest current number as starting point
4. **Handle Modified Components**
   * Changed components try to keep original number
   * If conflict exists, they get new number
   * Check results to see which components were renumbered
5. **Update Production Documentation**
   * Generate updated lists showing new components
   * Inform production team of any number changes
   * Update machine files if necessary

#### Workflow 3: Using Fixed Numbers for Large Beams

**Scenario:** Your project has expensive glulam beams that are pre-ordered. They need fixed numbers matching the supplier's documentation.

**Steps:**

1. **Gather Supplier Information**
   * Obtain supplier's component reference numbers
   * Note which beams in your model correspond to each supplier number
   * Document any special handling requirements
2. **Switch to D-CAM**
   * Navigate to D-CAM model area
   * Make the glulam beams visible and easy to select
3. **Assign Fixed Numbers**

   ```
   Supplier Ref    Component Description          Fixed Number
   -----------     ---------------------------    ------------
   GLB-001         Main ridge beam 300x600        1000
   GLB-002         Valley beam 200x400            1001
   GLB-003         Support beam 240x500           1002
   ```
4. **For Each Beam:**
   * Enter the fixed number (e.g., 1000)
   * Select the corresponding component
   * Click the fixed number assignment button
   * Verify the assignment in object info
5. **Perform Regular Sorting**
   * Switch back to your main model area
   * Run normal sorting
   * Fixed numbers are protected and won't change
   * Other components work around fixed numbers
6. **Verify in Outputs**
   * Generate material list
   * Confirm glulam beams show fixed numbers
   * Check that supplier numbers match your documentation
   * Create machine files knowing critical beams are correctly identified

#### Workflow 4: Setting Up Beam Type Ranges for Production

**Scenario:** Your production facility has specialized lines for different component types. You want sorting numbers to reflect this organization.

**Steps:**

1. **Map Production Lines to Component Types**

   ```
   Production Line    Component Types           Number Range
   ----------------   ----------------------    ------------
   Beam Line          Purlins, rafters          100-199
   Panel Line         Wall panels, roof panels  200-399
   Special Components Glulam, engineered        400-499
   Hardware/Other     Everything else           500-999
   ```
2. **Open Beam Type Sorting Settings**
   * Access main sorting dialog
   * Navigate to "Beam Type Dependent Sorting Numbers"
3. **Configure Each Production Line**

   **Beam Line Configuration:**

   ```
   From Beam Type: 320   To Beam Type: 329   (Purlins)
   From Number: 100      To Number: 149

   From Beam Type: 410   To Beam Type: 419   (Rafters)
   From Number: 150      To Number: 199
   ```

   **Panel Line Configuration:**

   ```
   From Beam Type: 851   To Beam Type: 853   (Panels)
   From Number: 200      To Number: 399
   ```

   **Special Components:**

   ```
   From Beam Type: 700   To Beam Type: 799   (Engineered)
   From Number: 400      To Number: 499
   ```
4. **Test the Configuration**
   * Run sorting with these settings
   * Check that components fall into expected ranges
   * Review warnings if any components couldn't fit
5. **Adjust Ranges if Needed**
   * If you see "outside range" warnings
   * Expand number ranges
   * Or refine beam type group definitions
6. **Save as Template**
   * Save these settings as a favorite
   * Use for all future projects with similar production setup

#### Workflow 5: Managing Number Conflicts

**Scenario:** After sorting, you discover that components from different model areas have overlapping numbers, causing machine file problems.

**Steps:**

1. **Identify the Problem**
   * Review sorting results dialog
   * Look for warning about number overlap
   * Note which model areas are conflicting
2. **Understand Why It Happened**
   * Model area A's highest number exceeds Model area B's start number
   * Example: Walls numbered 1-250, but roof starts at 200
3. **Solution: Adjust Start Numbers**

   ```
   Current (PROBLEM):
   Walls: Start 1, Highest 250
   Roof: Start 200, Highest 350  ← Conflict! (200-250 overlap)

   Corrected:
   Walls: Start 1, Highest 250
   Roof: Start 300, Highest 400  ← No conflict
   ```
4. **Implement the Fix**
   * Open sorting dialog
   * Change roof start number to 300
   * Resort the building completely ("Sorting New")
5. **Prevent Future Conflicts**
   * Set "Identical numbers allowed in model" to **No**
   * This automatically prevents cross-model-area duplicates
   * All "restart sorting" set to "positional"
   * All "package/element consideration" set to "Yes"
   * Note: This option only changeable in D-CAM model area
6. **Verify Resolution**
   * Check sorting results dialog
   * Confirm no warnings appear
   * Test generate machine files
   * Verify files are accepted by equipment

***

### Part 5: Best Practices and Tips

#### Planning Your Number Strategy

**Before Starting a Project:**

1. **Estimate Component Quantities**
   * Count approximate number of wall components
   * Count floor deck components
   * Count roof components
   * Add buffer for changes
2. **Allocate Number Ranges**

   ```
   Example for typical building:

   Walls: 1-199 (allowing ~200 different components)
   Floor Decks: 200-399 (allowing ~200 different components)
   Roof: 400-699 (allowing ~300 different components)
   Special/D-CAM: 700-999 (allowing ~300 different components)
   ```
3. **Document Your Strategy**
   * Write down your numbering plan
   * Share with team members
   * Include in project documentation

#### Maintaining Number Consistency

**During Project:**

1. **Sort at Logical Milestones**
   * After completing each major input phase
   * Before major reviews or approvals
   * Before generating client deliverables
2. **Use "Attach" When Possible**
   * Preserves existing numbers
   * Reduces confusion for production team
   * Maintains continuity with earlier deliverables
3. **Communicate Changes**
   * When re-sorting changes numbers, document which components affected
   * Notify production team of any number changes
   * Update all active documentation

#### Troubleshooting Common Issues

**Problem: Components Keep Changing Numbers**

**Causes:**

* Using "Sorting New" instead of "Attaching"
* Component properties being modified
* Sorting criteria too strict

**Solutions:**

* Use "Attaching" for incremental changes
* Verify component stability before sorting
* Consider fixed numbers for critical components

***

**Problem: Identical Components Get Different Numbers**

**Causes:**

* Sorting criteria includes factors that differ
* Package/element considerations affecting comparison
* Building MOS (structure) affecting sorting

**Solutions:**

* Review "Sort According To" settings
* Check package/element consideration setting
* Verify components are truly identical (same material, dimensions, machining)

***

**Problem: Machine Files Rejected Due to Duplicate Numbers**

**Causes:**

* Same numbers exist in different model areas
* "Identical numbers allowed in model" set to "Yes"

**Solutions:**

* Set "Identical numbers allowed in model" to "No"
* Re-sort with adjusted start numbers to eliminate overlap
* This setting only changeable in D-CAM model area

***

**Problem: Fixed Numbers Not Staying Fixed**

**Causes:**

* Numbers assigned as normal, not fixed
* Working in wrong model area (fixed only works in D-CAM)

**Solutions:**

* Verify fixed numbers show special formatting
* Check object info for fixed number indicator
* Reassign using D-CAM fixed number function

***

**Problem: Components Outside Beam Type Number Range**

**Causes:**

* Too many components of that type for allocated range
* Range too small for project size

**Solutions:**

* Expand the number range for that beam type group
* Accept that some will spill over (system handles gracefully)
* Re-plan ranges for better distribution

***

#### Quality Control Checklist

**Before Finalizing Sorting:**

* \[ ] All components have sorting numbers
* \[ ] Identical components share the same number
* \[ ] Different components have different numbers
* \[ ] No unexpected number overlaps between model areas
* \[ ] Fixed numbers are correctly assigned and protected
* \[ ] Beam type ranges (if used) are working as intended
* \[ ] Highest numbers don't exceed planned ranges
* \[ ] Material list generates correctly with sorting numbers
* \[ ] Machine files can be created without errors
* \[ ] Numbers match any external documentation requirements

**Before Releasing to Production:**

* \[ ] Final sorting complete and verified
* \[ ] Settings saved for potential re-sorting
* \[ ] Number changes (if any) communicated to team
* \[ ] Updated lists and plans generated
* \[ ] Machine files regenerated with final numbers
* \[ ] Loading plans reflect correct sorting numbers
* \[ ] Assembly documentation uses correct numbers

***

### Conclusion

Sorting numbers are a fundamental organizational tool in Dietrich's software that enables efficient production, clear communication, and accurate component tracking throughout the construction process. By understanding when and how to use automatic sorting, beam type ranges, and fixed numbers, you can create a robust numbering system that serves your project from design through installation.

**Key Takeaways:**

1. **Sort regularly** but not excessively - at logical project milestones
2. **Plan your number ranges** before starting to avoid conflicts
3. **Use "Attaching"** to preserve existing numbers when adding components
4. **Assign fixed numbers** to critical components that need stability
5. **Configure beam type ranges** when production organization matters
6. **Always verify** sorting results before releasing to production
7. **Set "Identical numbers in model" to No** to prevent machine file issues

With these practices in place, your sorting numbers will provide reliable component identification and support smooth project execution from office to construction site.

***

### German Terminology Reference

For users working with German-language documentation:

| English              | German                          |
| -------------------- | ------------------------------- |
| Sorting Number       | Sortier-Nummer, laufende Nummer |
| Fixed Sorting Number | Feste Sortier-Nummer            |
| Running Number       | Laufende Nummer                 |
| Beam Type            | Stabtyp                         |
| Start Number         | Startnummer                     |
| Attaching            | Anhängen                        |
| Model Area           | Modellbereich                   |

***

*Document Version: 1.0*\
\&#xNAN;*Created for Dietrich's Software Users*\
\&#xNAN;*Based on Update V19.01 through V23.01 documentation*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dietrichs.com/tutorials/tutorials-en/building-in-dietrichs/builders-journey/sorting-numbers-detailed-draft..md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
