ModraUp Ruby API Documentation Ruby API Reference

Module: ModraUp::Skp

Overview

Unopened .skp file tools.

Examples:

ModraUp::Skp.read_guid("/tmp/missing.skp") rescue ArgumentError

Class Method Summary # collapse

Class Method Details

ModraUp::Skp.read_guid(filepath) ⇒ String

Read the model GUID from a .skp file. Raise ArgumentError if the file is missing or not a SketchUp model.

Parameters:

  • filepath (String)

Returns:

  • (String)

Raises:

  • [ArgumentError] File not found or not a .skp
Note: The file GUID read is not yet connected, and even after successfully opening the file, it returns an empty string.

Examples:

begin
  ModraUp::Skp.read_guid("/tmp/missing.skp")
rescue ArgumentError
end