Model.createdummytargetpointsfromcsv#
- Model.createdummytargetpointsfromcsv(filename, skiplines='')#
Creates new design points or updates certain fields of existing design points in the model from a comma separated values (CSV) file holding the test lab measurement data for different named points on the dummy. The data in the CSV file should have the following items as fields in a sequence:
The name of the design point or a node name that can be found in an outputblocks entity in the model
The coordinate name (valid values: X, Y, Z)
The measurement data (the target location) of that specific coordinate
The allowed negative deviation (optional, default 0.0)
The positive deviation for the specified coordinate (optional, default 0.0)
Any other blank fields in the file will be ignored. If any of the first three items are missing or not in the correct order, those lines in the CSV will be skipped during reading.
Example of a CSV file:
Dummy Targets Position [mm],,Deviation Range [mm],,Validation,
POINT NAME,Coordinate,Test Measurement,(-),(+),CAE Position,Test .vs. CAE
GLOBAL_CHEST_TRACKING_VISUAL_TAG,skip,0,-0.1,0.1,,
LEFT_CLAVICULAR_LINK_BOLT_HEAD_VISUAL_TAG,X,2871.863084,-0.1,0.1,,
LEFT_FRONT_SHIN_BOLT_HEAD_VISUAL_TAG,Y,491.2761069,-0.1,0.1,,
LEFT_LUMBAR_BLOCK_BOLT_HEAD_VISUAL_TAG,Z,547.6719761,-0.1,0.1,,
The first three lines would be automatically skipped. The first two lines would be skipped because they do not have coordinate name as the second field and no integers that can be used as the coordinate value or allowed deviations. The third line would be skipped because the second field does not have a value of X, or Y, or Z. The last three lines are valid and would be processed.
- Parameters:
Example#
Create dummy target points by reading the file.csv located in “C:/temp” directory and to skip lines 1-14, 18-20, 35-37, 47, 50, 64-66#import hm import hm.entities as ent model = hm.Model model.createdummytargetpointsfromcsv( filename="C:/temp/file.csv", skiplines="1-14,18-20,35-37,47,50,64-66" )