It is a common practice in the pipe fabrication industry to track work in progress using unique sequence numbers. You can use Get External Data function to assign a unique sequence number to a pipeline using the pipeline reference. You can then map this sequence number to the SPOOL-PREFIX property so that spool drawings are automatically assigned unique, but not sequential, sequence numbers.
Pipeline Sequence Number |
Spool |
Spool-ID |
A-0001 |
1 |
00011 |
A-0001 |
2 |
00012 |
A-0001 |
3 |
00013 |
B-0002 |
1 |
00021 |
B-0002 |
2 |
00022 |
You must use a Microsoft Access database to hold the list of sequence numbers. The Microsoft Access database allows you to specify that the ID field must have a unique entry. The database must contain a table with at least the following two columns: the ID column, which contains text, and the SeqNo column, which contains an integer. The ID column is defined as the primary key and cannot contain duplicate entries.
Because there can be only one entry for each ID, the first SQL statement in the following example will fail if a row in the database currently exists. If there is no row, a new one is added with the sequence number set to the next available.
The following SQL statement is then used to return the sequence number (formatted as required using the FORMATS statement) for the current ID.