Close

Batch

< Back

Use Batch Shooting if you need to capture images for many objects (or people), and need to capture a series of images for each object and attach unique object identifiers to the folder, filename or image metadata. This make it very easy to keep track of object images and know which image is of a particular object. Batch shooting is intended to be used for high-volume workflows such as
– Product Photography
– Team or Class Photos
– Museum or Archive Imaging
– Laboratory Imaging
– Forensic Imaging


You can import data in a text file and it is stored in an internal Firebird database. Each imported dataset must have an associated JOB. Within the dataset, each row of data must have a unique BATCHID. Therefore, in the database, the JOB + BATCHID combination is always unique and cannot be duplicated.

You can also import data via ODBC from another database. And you can so skip the import process altogether and do the batch activation query directly against another database via ODBC, such as an Oracle or Microsoft SQL Server.

Note: If you don’t want to import data, and just want the entered BatchID or the value of the barcode to be set as part of the file or folder name, or set into an IPTC field, go to the preferences screen, batch tab, and put a checkmark beside ‘Disable database query’. The batchID will appear in the @BID token. All other batch tokens will be blank.

Note: Put a checkmark in “Move focus to activate button after BID entry or serial scan” in the Preferences screen, Batch tab, to force to cursor focus to move to the batch activate button after manually entering or scanning a BID. This allows you to use keyboard shorcuts (except the enter key) immediately after entering or scanning the BID. Ex. You may want to scan and press a key to shoot, then review fullscreen.

Batch Record Data
Each record has the following data fields. The data can be any characters (including non-english characters) as it is stored internally in UTF-8 format. This data can then be embedd in folder and filenames (make sure no forbidden characters are used there), and in the IPTC metadata of the captured image. If you are importing data via ODBC, all of the following fields must be populated. If importing from a text file, trailing empty fields do not need to be populated – see the text file import example below. Here are the data fields:
JOB – Varchar(32)
BID – Varchar(256)
BD1 – Varchar(256)
BD2 – Varchar(256)
BD3 – Varchar(256)
BD4 – Varchar(256)
BD5 – Varchar(256)
BD6 – Varchar(256)
BD7 – Varchar(256)
BD8 – Varchar(256)
BD9 – Varchar(256)
Only the JOB and BID fields require values. Any of the BD1-BD9 fields can be blank or null.

Embedding the Batch Data
In Folder name, use any of : @JOB, @BID, @BD1, @BD2, @BD3, @BD4, @BD5, @BD6, @BD7, @BD8, @BD9
Ex: Folder: c:\images\@JOB\@BID
In File Name, use any of: @JOB, @BID, @BD1, @BD2, @BD3, @BD4, @BD5, @BD6, @BD7, @BD8, @BD9, @BIDCTR
Ex: Filename: @JOB-@BID-@BIDCTR (the @BIDCTR provides a zero-based counter for that BatchID in that folder). Therefore, it is best to have separate folders for jobs as to avoid BID duplication. JOB’s shoudl be large, grouping terms like ‘CLASS2014’, or ‘PAINTINGS-EASTWING’
In the Metadata tab IPTC fields, use any of: @JOB, @BID, @BD1, @BD2, @BD3, @BD4, @BD5, @BD6, @BD7, @BD8, @BD9

Barcode Scanners
To speed up the entry of the BatchID into ControlMyNikon, you can use a barcode scanner. A serial barcode scanner is best as you do not need to click in the BatchID text entry field before scanning or click on the Activation button after the scan. A keyboard wedge scanner will require you to click in the BatchID text entry field first and then click on the Activate button, which can slow down your workflow.

You will also need to put an exclamation ‘!’ as a data prefix, and ‘@’ as a data suffix. This can be done using the configuration software that came with your scanner.

The Active BatchID
In the Batch Shooting window, you can enter or scan a BatchID (let’s say you entered ‘1234’), and then press the Activate button. By pressing this button, ControlMyNkon searches for the BatchID in the database. If it can’t find it, it will indicate ‘Not Found’ in the data log. If it found it, it will display all data fields in the data log. You should look at this datalog and confirm that it is what you want before you capture the image.

If it is a valid BatchID, it becomes active and it’s counter is reset to zero (this is used by @BIDCTR). The first image you capture while using this active BatchID will have a 1234-000.jpg (or .nef) file name, and the next image will have a 1234-001.jpg name. The counter will continue incrementing until you activate a different BatchID, at which time it will reset to zero. You can control the number of leazing zero’s in the batch counter in the preference screen, Misc tab.

Note: You can put a checkmark beside ‘Auto’ and it will trigger the shutter immediately after a successful activation. This can help save time once you get used to the workflow.

Note: If using the Internal data mode, the internal data will be displayed in a grid on Batch Editor screen as well as the Batch tab. You can double-click, or press the enter key on a record in the grid to activate it. This grid will be blank when using the external data mode.

Printing Barcodes
To print simple barcodes, open the ‘Source’ screen and click on the ‘Print’ button and select a barcode report. This can also be saved to a PDF file. It will print a sheet of barcodes for your data with the BatchID as the actual barcode value. You can also print your own barcodes with a different application or use pre-existing barcodes such as the UPC code on a product.

Importing Data with ODBC
If you already have a database, such as an access, Oracle or any database with an ODBC driver, you can import data from it into ControlMyNikon’s batch database. Much simpler than exporting from it into CSV, then importing the CSV into ControlMyNikon. Here’s how to do it:
– On the Batch tab, click on the Source button. This brings up the data import and querying module.
– Click on the Internal tab and then click on the ‘Import from ODBC’ tab.
– Select the DSN. This is the ODBC connection to the source database that you have set up in the Windows Control Panel ODBC or Data Sources applet.
– Enter the Username and Password for the ODBC connection.
– Write the SQL statement in the top memo field. It may be quite large, depending on your source database. For example, it may look like
Ex: SELECT ‘DRINKS’ AS JOB, ID AS BID, UPC AS BD1, NAME AS BD2, MANUFACTURER AS BD3, RELEASED AS BD4 , ” AS BD5, ” AS BD6, ” AS BD7, ” AS BD8, ” AS BD9 FROM PRODUCT ORDER BY NAME

Note how the sql statement must force field aliases such as JOB, BID, etc. This is so ControlMyNikon can know where that data should go in the internal database.

– Press the Execute button. This executes the SQL and you will see the results in the grid. If you have any data with non-English characters and they look odd, put a checkmark beside ‘UTF8’ decode and execute again.
– Examine the results. You may get an error and need to tweak the query. You can click on the SQL Monitor button to see the actual query being sent and any error messages that may have resulted.
– If the data looks ok, click on the ‘Post’ button. This will insert the data into the internal database.
– Once the data has been posted, you will need to go back to the Setup tab and select the correct Internal Job.
– The data associated with the Job is now ready to used in the Batch tab.

Note: ControlMyNikon is a 32-bit app, so the ODBC DSN you set up must be 32-bit as well.

Using an Activation Query with ODBC
You can forego data import if you have direct access to the source database: i.e: ControlMyNikon and the source database can see each other. To create set it up, do the following:
– On the Source screen, click on the External radio button and select the source database DSN. Enter the username and password.
– Go to the External tab, and enter the activation query. It may look something like this:
SELECT ‘Insects’ AS JOB, ID AS BID, COMMON_NAME AS BD1, SCIENTIFIC_NAME AS BD2, ORDEROF AS BD3, FAMILY AS BD4, GENUS AS BD5, SPECIES AS BD6, AUTHOR AS BD7, NULL AS BD8, NULL AS BD9 FROM INSECTS WHERE ID = :BATCHID
– Here again we are using field aliases to map the data to fields that ControlMyNikon can understand. The :BatchID part on the end is the parameter, and will be used during the Activation and testing process.
Enter a valid BatchID into the box above and press Execute. In this case, the BatchID needs to be a value from the ID field in the Insects table.

– Examine the results. You may get an error and need to tweak the query. You can click on the SQL Monitor button to see the actual query being sent and any error messages that may have resulted.
– If the data in the grid looks ok, then can go back to the Batch tab and type in a batchid and activate it. The query you entered will be used to query the source database.
– If you intend to print barcodes on this data, go to the Print Query tab and enter the printing query there. Once you have a good print query, try running a barcode report. Here is an basic query that is not search compatible:
SELECT ‘Insects’ AS JOB, ID AS BID, COMMON_NAME AS BD1, SCIENTIFIC_NAME AS BD2, ORDEROF AS BD3, FAMILY AS BD4, GENUS AS BD5, SPECIES AS BD6, AUTHOR AS BD7, NULL AS BD8, NULL AS BD9 FROM INSECTS ORDER BY COMMON_NAME
You can search the dataset from the search box in the Batch tab in the main screen. You must modify your query so that ControlMyNikon is able to insert the correct WHERE clauses automatically. Here is the same query as above, but formatted in a way that is compatible with the search function:
SELECT * FROM
(
SELECT ‘Insects’ AS JOB, ID AS BID, COMMON_NAME AS BD1, SCIENTIFIC_NAME AS BD2, ORDEROF AS BD3, FAMILY AS BD4, GENUS AS BD5, SPECIES AS BD6, AUTHOR AS BD7, NULL AS BD8, NULL AS BD9 FROM INSECTS
) X ORDER BY BD1

– Select the BID DataType in the Activation Query tab. Use ftMemo for Access databases. Use ftString for all others.
CSV Import Example 1 – Product Session – Soft Drinks
12345,Portrait,Coca Cola,Diet Coke,8372829383
12346,Landscape,Coca Cola,Cherry Coke,8372829383
12347,Portrait,Coca Cola,Coke Classic,8372829114

Note: The above data is contained in the file BatchDataExample_1.csv which is located in the same folder that ControlMyNikon is installed.

If you activate BatchID 12345, the tokens will be populated as follows:
@BID = 12345
@BD1 = Portrait
@BD2 = Coca Cola
@BD3 = Diet Coke
@BD4 = 8372829383

Note: You could use the soft drink UPC codes instead and scan the barcode on the product instead.
CSV Import Example 2 – School Session – Graduation
1|2014|Sandra|James|Oceanview High School|Grad 2014|8169|Package 1
2|2014|Russell|Jones|Oceanview High School|Grad 2014|8170|Package 1
3|2014|Tony|Lough|Oceanview High School|Grad 2014|8171|Package 2

Note: The above data is contained in the file BatchDataExample_2.txt which is located in the same folder that ControlMyNikon is installed.

If you activate BatchID 1, the tokens will be populated as follows:
@BID = 1
@BD1 = 2014
@BD2 = Sandra
@BD3 = James
@BD4 = Oceanview High School
@BD5 = Grad 2014
@BD6 = 8169
@BD7 = Package 1

Last Updated On February 21, 2018