+ int hidden, locked, props = 0;
+ char textBuffer[65536];
+
+ // Load drawing properties, if any, first
+ fscanf(file, "PROPERTIES %i\n", &props);
+
+ if (props == 4)
+ {
+ fscanf(file, "BASE_UNIT %i\n", &(drawing->baseUnit));
+ fscanf(file, "UNIT_STYLE %i\n", &(drawing->unitStyle));
+ fscanf(file, "DEC_PREC %i\n", &(drawing->decimalPrecision));
+ fscanf(file, "FRAC_PREC %i\n", &(drawing->fractionalPrecision));
+ }
+
+ // Load layer information next
+ fscanf(file, "LAYERS %i\n", &Global::numLayers);
+
+ for(int i=0; i<Global::numLayers; i++)
+ {
+ fscanf(file, "%i %i \"%[^\"]\"\n", &hidden, &locked, textBuffer);
+ Global::layerHidden.push_back(hidden ? true : false);
+ Global::layerLocked.push_back(locked ? true : false);
+ Global::layerName.push_back(textBuffer);
+ }
+
+ fscanf(file, "ACTIVE %i\n", &Global::activeLayer);
+