Sketchup
- class HPS.Sketchup : public IDisposable
The Sketchup class contains objects used for importing SketchUp files.
- class File : public IDisposable
The File class provides functions to import SketchUp files.
Public Static Functions
- HPS.Sketchup.ImportNotifier Import (string in_file_name, HPS.Sketchup.ImportOptionsKit in_options)
Performs an asynchronous import of the specified SketchUp file with the provided options. May throw an IOException prior to starting the asynchronous import.
- Param in_file_name
The name of the SketchUp file to import.
- Param in_options
The options controlling the import of the SketchUp file.
- Return
An ImportNotfier object that can be used to query the import progress and status.
- class ImportNotifier : public HPS.IONotifier
The ImportNotifier class is a smart-pointer that is tied to a file import. It is used to interact with an ongoing import or get the results from a completed import.
Public Functions
- void Assign (HPS.Sketchup.ImportNotifier in_that)
Associate this ImportNotifier with the same file import as the source ImportNotifier.
- Param in_that
The source ImportNotifier for the assignment.
- override void Dispose ()
- HPS.Sketchup.ImportResultsKit GetResults ()
Get the ImportResultsKit for the file import. Throws an IOException if the import is not complete or was not successful.
- Return
The ImportResultsKit for a successful file import.
- ImportNotifier ()
The default constructor creates an ImportNotifier object which is not tied to any file import.
- ImportNotifier (HPS.IONotifier in_that)
The conversion constructor creates a new derived ImportNotifier object from a base IONotifier object. The copy will only be successful if the source notifier is really an upcast of this notifier type. Otherwise the copy will fail and the resulting ImportNotifier will be invalid.
- Param in_that
The source IONotifier to copy.
- ImportNotifier (HPS.Sketchup.ImportNotifier in_that)
The copy constructor creates a new ImportNotifier object that is associated with the same file import as the source ImportNotifier.
- Param in_that
The source ImportNotifier to copy.
- override HPS.Type ObjectType ()
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Return
The declared type of the object in question, which may differ from the true, underlying type.
- class ImportOptionsKit : public HPS.SprocketKit
The ImportOptionsKit class is a user space object. It contains settings controlling what and how data is imported via Sketchup.
Public Functions
- override void Dispose ()
- override bool Empty ()
Indicates whether this ImportOptionsKit has any values set on it.
- Return
true if no values are set on this ImportOptionsKit, false otherwise.
- bool Equals (HPS.Sketchup.ImportOptionsKit in_kit)
Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.
- Param in_kit
The source ImportOptionsKit to compare to this ImportOptionsKit.
- Return
true if the objects are equivalent, false otherwise.
- override bool Equals (Object obj)
- override int GetHashCode ()
- ImportOptionsKit ()
The default constructor creates an empty ImportOptionsKit object.
- ImportOptionsKit (HPS.Sketchup.ImportOptionsKit in_kit)
The copy constructor creates a new ImportOptionsKit object that contains the same settings as the source ImportOptionsKit.
- Param in_kit
The source ImportOptionsKit to copy.
- override HPS.Type ObjectType ()
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Return
The declared type of the object in question, which may differ from the true, underlying type.
- void Set (HPS.Sketchup.ImportOptionsKit in_kit)
Copies the source ImportOptionsKit into this ImportOptionsKit.
- Param in_kit
The source ImportOptionsKit to copy.
- HPS.Sketchup.ImportOptionsKit SetHiddenData (bool in_state)
Sets whether to import hidden data from the SketchUp file. Defaults to false.
- Param in_state
Whether to import hidden data from the SketchUp file.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit SetMetaData (bool in_state)
Sets whether to import metadata from the SketchUp file. Defaults to false.
- Param in_state
Whether to import metadata data from the SketchUp file.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit SetPortfolio (HPS.PortfolioKey in_portfolio)
Sets the PortfolioKey where the SketchUp data will be imported into. If no segments are specified, root segments will be created for this purpose during import.
- Param in_portfolio
Portfolio the SketchUp data will be imported into.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit SetTarget (HPS.Model in_model)
Uses the Model to set the root segment, library segment, and portfolio where the SketchUp data will be imported into.
- Param in_model
Model to use to implicitly set Segment, Library and Portfolio the SketchUp data will be imported into.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit SetTarget (HPS.SegmentKey in_target, HPS.SegmentKey in_library)
Sets the root and library segments where the SketchUp data will be imported into. If no segments are specified, root segments will be created for this purpose during import.
- Param in_target
Segment the SketchUp data will be imported into.
- Param in_library
Segment the SketchUp includes data will be imported into.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit SetView (HPS.View in_view)
Sets the View where the default SketchUp camera will be imported into. If no View provided, camera can be retrieved via ImportResultsKit.ShowMainCamera.
- Param in_view
View where SketchUp camera will be imported into.
- Return
A reference to this ImportOptionsKit.
- void Show (out HPS.Sketchup.ImportOptionsKit out_kit)
Copies this ImportOptionsKit into the given ImportOptionsKit.
- Param out_kit
The ImportOptionsKit to populate with the contents of this ImportOptionsKit.
- bool ShowHiddenData (out bool out_state)
Shows whether to import hidden data from the SketchUp file. Defaults to false.
- Param out_state
Whether to import hidden data from the SketchUp file.
- Return
A reference to this ImportOptionsKit.
- bool ShowMetaData (out bool out_state)
Shows whether to import metadata from the SketchUp file. Defaults to false.
- Param out_state
Whether to import metadata data from the SketchUp file.
- Return
A reference to this ImportOptionsKit.
- bool ShowPortfolio (out HPS.PortfolioKey out_portfolio)
Shows the PortfolioKey where the SketchUp data will be imported into. If no segments are specified, root segments will be created for this purpose during import.
- Param out_portfolio
Portfolio the SketchUp data will be imported into.
- Return
A reference to this ImportOptionsKit.
- bool ShowTarget (out HPS.Model out_model)
Shows the root and library segments and portfolio where the SketchUp data will be imported into. If no segments are specified, root segments will be created for this purpose during import.
- Param out_model
Model to use to implicitly set Segment, Library and Portfolio the SketchUp data will be imported into.
- Return
A reference to this ImportOptionsKit.
- bool ShowTarget (out HPS.SegmentKey out_target, out HPS.SegmentKey out_library)
Shows the root and library segments where the SketchUp data will be imported into. If no segments are specified, root segments will be created for this purpose during import.
- Param out_target
Segment the SketchUp data will be imported into.
- Param out_library
Segment the SketchUp includes data will be imported into.
- Return
A reference to this ImportOptionsKit.
- bool ShowView (out HPS.View out_view)
Shows the view where the SketchUp camera will be imported into.
- Param out_view
View where SketchUp camera will be imported into.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit UnsetEverything ()
Removes all settings from this ImportOptionsKit.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit UnsetHiddenData ()
Removes the Hidden data import state.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit UnsetMetaData ()
Removes the metadata import state.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit UnsetPortfolio ()
Removes the Portfolio import state.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit UnsetTarget ()
Removes the target and library segments, and Model import state.
- Return
A reference to this ImportOptionsKit.
- HPS.Sketchup.ImportOptionsKit UnsetView ()
Removes the View import state.
- Return
A reference to this ImportOptionsKit.
Public Static Functions
- HPS.Sketchup.ImportOptionsKit GetDefault ()
Creates an ImportOptionsKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default. These values will be used for import unless an option is overridden by the options passed to File.Import.
- Return
An ImportOptionsKit with the default settings.
- bool operator!= (HPS.Sketchup.ImportOptionsKit a, HPS.Sketchup.ImportOptionsKit b)
- bool operator== (HPS.Sketchup.ImportOptionsKit a, HPS.Sketchup.ImportOptionsKit b)
- class ImportResultsKit : public HPS.SprocketKit
The ImportResultsKit class contains the results of a successful SketchUp import.
Public Functions
- override void Dispose ()
- override bool Empty ()
Indicates whether this ImportResultsKit has any values set on it.
- Return
true if no values are set on this ImportResultsKit, false otherwise.
- bool Equals (HPS.Sketchup.ImportResultsKit in_kit)
Check if the source ImportResultsKit is equivalent to this ImportResultsKit.
- Param in_kit
The source ImportResultsKit to compare to this ImportResultsKit.
- Return
true if the objects are equivalent, false otherwise.
- override bool Equals (Object obj)
- override int GetHashCode ()
- ImportResultsKit ()
The default constructor creates an empty ImportResultsKit object.
- ImportResultsKit (HPS.Sketchup.ImportResultsKit in_kit)
The copy constructor creates a new ImportResultsKit object that contains the same settings as the source ImportResultsKit.
- Param in_kit
The source ImportResultsKit to copy.
- override HPS.Type ObjectType ()
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Return
The declared type of the object in question, which may differ from the true, underlying type.
- void Set (HPS.Sketchup.ImportResultsKit in_kit)
Copies the source ImportResultsKit into this ImportResultsKit.
- Param in_kit
The source ImportResultsKit to copy.
- void Show (out HPS.Sketchup.ImportResultsKit out_kit)
Copies this ImportResultsKit into the given ImportResultsKit.
- Param out_kit
The ImportResultsKit to populate with the contents of this ImportResultsKit.
- bool ShowMainCamera (out HPS.CameraKit out_camera)
Shows the camera where the main SketchUp camera was imported into.
- Param out_camera
CameraKit where main SketchUp camera was imported into
- Return
true if a valid camera was imported, false otherwise.
- bool ShowPortfolio (out HPS.PortfolioKey out_portfolio)
Shows the PortfolioKey where the SketchUp data was imported into.
- Param out_portfolio
Portfolio the SketchUp data was imported into.
- Return
true if a valid Portfolio is set, false otherwise.
- bool ShowScenes (out string[] out_names, out HPS.CameraKit[] out_cameras)
- bool ShowTarget (out HPS.Model out_model)
Shows the Model where the SketchUp data was imported into.
- bool ShowTarget (out HPS.SegmentKey out_target, out HPS.SegmentKey out_library)
Shows the root and library segments where the SketchUp data was imported into.
- Param out_target
Segment the SketchUp data was imported into.
- Param out_library
Segment the SketchUp includes data was imported into.
- Return
true if a valid target and library segment are set, false otherwise.
Public Static Functions
- bool operator!= (HPS.Sketchup.ImportResultsKit a, HPS.Sketchup.ImportResultsKit b)
- bool operator== (HPS.Sketchup.ImportResultsKit a, HPS.Sketchup.ImportResultsKit b)