simple answer: you don't.
complex answer: in scanning Implant cases a special adapter is placed overtop of your implant, that has geometry that the scan software understands. it sees the placement of this special scanning adapter (scan body) and artificially places implant geometry in the scan model.since the software understands the geometry of the scan body, it knows the correct orientation of the implant.
alternative answer: if for whatever reason you want to scan the actual internal hex or thread then you either need to expose it, cut it in two, or scan using a very special scanner and software that is not found in Dental suppliers. using MRI or GPR you may do this.