eGo QR configuration

In CADMATIC eShare, the user can print the properties of an object or object group. The QR code that is included in these print-outs functions as a link to the entity in the 3D model, and CADMATIC eGo can read the QR code to open the entity in its 3D view.

If your site uses QR codes that are not generated by eShare, you can still enable eGo to read the QR codes—by using a script.

In the eGo QR Configuration view, project administrator can enter a custom script that eGo can use if it fails to read a QR code in the normal way.

The script must be written in C#, and it needs to parse a string-typed variable named qrCode (representing the data received from reading a QR code) into a local object named result. This local object can have the following properties:

result.Key

The key of the object to be found from the model.

string

result.PoiName The name of the Smart Point to be found from the model. string
result.PoiExternalId The External Id of the Smart Point to be found from the model. string

result.Abbreviation

The abbreviation of the attribute to be found from the object. (If set, also result.Value must be set.)

string

result.Value

The value of the attribute to be found from the object. (If set, also result.Abbreviation must be set.)

string

result.CameraX

result.CameraY

result.CameraZ

result.CameraSlope

result.CameraRotation

Coordinate values for the camera position in the 3D view. Also slope and rotation can be set for the view angle.

All camera position values are optional.

float

The script supports regular expressions and Uri-objects, as well as System.Text Namespace functions.

Do the following:

  1. Navigate to the project to edit, and then click Project Admin in the main menu. The project administration view opens.

  2. Click Model Configuration. The model configuration view opens.

  3. Click eGo QR Configuration. The eGo QR Configuration view opens.

  4. Create the script in the editor box.

    Note: AI support can be configured by system administrator to assist in creating a script. When AI support is enabled, Ask AI button is shown. See AI assistant.

  5. Enter some valid test data in the Test Input field and click Test to evaluate the script.

    eShare runs the script and shows the output values it received, as well as compilation errors, if there were any.

  6. Click Save to save the completed script.

Related Tasks

  • Use the Export All and Import buttons of the script configuration view to copy the script code to the projects that require custom QR parsing.
  • In CADMATIC eGo, the user must synchronize the required projects with eShare. This downloads the custom QR parsing method from eShare, and then the user can start reading custom QR codes.