See "Opening a Device" here:
https://labjack.com/support/software/examples/ljm/daqfactory
DAQFactory's D# is the Identifier parameter passed to the open call:
https://labjack.com/support/software/api/ljm/function-reference/ljmopens
"To specify an identifier, use a serial number, IP address, or device name."
With USB, serial number would be the common choice to pass.