DWG
-
class
HPS.DWG: IDisposable The DWG class contains objects and enumerations used for importing and exporting CAD files via RealDWG.
-
class
CADModel: public HPS.CADModel The CADModel class is a smart pointer. It represents the DWG drawing file.
Public Functions
-
HPS.View
ActivateDefaultLayout() Creates a new View object corresponding to the default layout for this CADModel. The View object that is returned will have the corresponding visibility settings, material settings, transformation settings, and camera for the default capture set on it. This call is equivalent to calling ActivateDefaultCapture
Return: A newly created View object corresponding to this Layout.
-
CADModel() The default constructor creates an uninitialized CADModel object. The Type() function will return Type.None.
-
CADModel(HPS.CADModel in_that) This constructor creates an DWG.CADModel object that shares the underlying smart-pointer of the source HPS.CADModel. The copy will only be successful if the source component is really an upcast of an DWG.CADModel object. Otherwise the copy will fail and the resulting DWG.CADModel will be invalid.
Param in_that: The source HPS.CADModel to copy.
-
CADModel(HPS.Component in_that) This constructor creates a CADModel object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of an DWG.CADModel object. Otherwise the copy will fail and the resulting DWG.CADModel will be invalid.
Param in_that: The source Component to copy.
-
CADModel(HPS.DWG.CADModel in_that) This constructor creates an DWG.CADModel object that shares the underlying smart-pointer of the source HPS.CADModel. The copy will only be successful if the source component is really an upcast of an DWG.CADModel object. Otherwise the copy will fail and the resulting DWG.CADModel will be invalid.
Param in_that: The source HPS.CADModel to copy.
-
override void
Dispose()
-
HPS.DWG.Layout[]
GetAllLayouts() Get a list of all DWG layouts from all subcomponents for this CADModel.
Return: A list of all DWG layouts from all subcomponents for this CADModel.
-
IntPtr
GetDWGDatabase() Gets the AcDbDatabase pointer corresponding to this DWG.CADModel.
Return: The AcDbDatabase pointer corresponding to this DWG.CADModel.
-
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.
-
HPS.View
-
class
Component: public HPS.Component The Component class is a smart pointer. It represents a variety of DWG components. The primary purpose of this class is simply to provide access to the underlying DWG object for use by DWG library functions.
Subclassed by HPS.DWG.Layer
Public Functions
-
Component() The default constructor creates an uninitialized DWG.Component object. The Type() function will return Type.None.
-
Component(HPS.Component in_that) This constructor creates an DWG.Component object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of an DWG.Component object. Otherwise the copy will fail and the resulting DWG.Component will be invalid.
Param in_that: The source Component to copy.
-
Component(HPS.DWG.Component in_that) This constructor creates an DWG.Component object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of an DWG.Component object. Otherwise the copy will fail and the resulting DWG.Component will be invalid.
Param in_that: The source Component to copy.
-
override void
Dispose()
-
IntPtr
GetDWGObjectID() Gets the AcDbObjectId corresponding to this DWGComponent.
Return: The AcDbObjectId corresponding to this DWGComponent.
-
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
Factory: public HPS.Sprocket The Factory class is used to create and DWG objects which inherit from HPS.Component or one of its subclasses.
Public Static Functions
-
HPS.DWG.CADModel
CreateCADModel() Creates a new DWG.CADModel.
-
HPS.DWG.CADModel
CreateCADModel(HPS.Model in_model) Creates a new DWG.CADModel.
Param in_model: The Model associated with the newly created DWG.CADModel.
-
HPS.DWG.Component
CreateComponent(HPS.Component in_owner, HPS.Component.ComponentType in_type) Creates a new DWG.Component as a subcomponent of a given Component.
Param in_owner: The HPS.Component which owns the newly created DWG.Component. Param in_type: The type of DWG.Component to create.
-
HPS.DWG.Component
CreateComponent(HPS.Component in_owner, HPS.Component.ComponentType in_type, IntPtr in_object_id) Creates a new DWG.Component as a subcomponent of a given Component.
Param in_owner: The HPS.Component which owns the newly created DWG.Component. Param in_type: The type of DWG.Component to create.
-
HPS.DWG.Layer
CreateLayer(HPS.Component in_owner) Creates a new DWG.Layer as a subcomponent of a given Component.
Param in_owner: The HPS.Component which owns the newly created DWG.Layer.
-
HPS.DWG.Layer
CreateLayer(HPS.Component in_owner, IntPtr in_object_id) Creates a new DWG.Layer as a subcomponent of a given Component.
Param in_owner: The HPS.Component which owns the newly created DWG.Layer.
-
HPS.DWG.Layout
CreateLayout(HPS.Component in_owner, HPS.Component.ComponentType in_type) Creates a new DWG.Layout as a subcomponent of a given Component.
Param in_owner: The HPS.Component which owns the newly created DWG.Component. Param in_type: The type of DWG.Component to create.
-
HPS.DWG.Layout
CreateLayout(HPS.Component in_owner, HPS.Component.ComponentType in_type, IntPtr in_object_id) Creates a new DWG.Layout as a subcomponent of a given Component.
Param in_owner: The HPS.Component which owns the newly created DWG.Component. Param in_type: The type of DWG.Component to create.
-
HPS.DWG.CADModel
-
class
File: public IDisposable The File class provides functions to import CAD files via DWG.
Public Static Functions
-
HPS.DWG.ImportNotifier
Import(string in_file_name, HPS.DWG.ImportOptionsKit in_options) Performs an asynchronous import of the specified CAD file with the provided options. May throw an IOException prior to starting the asynchronous import.
Param in_file_name: The name of the CAD file to import. Param in_options: The options controlling the import of the CAD file. Return: An ImportNotfier object that can be used to query the import progress and status.
-
HPS.DWG.ImportNotifier
-
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. Copying, moving and assignment are inherited from IONotifier (the shared impl); only the default constructor, the IONotifier down-cast constructor and the result accessors are declared here.
Public Functions
-
override void
Dispose()
-
HPS.DWG.CADModel
GetCADModel() Get the CADModel for the file import. Throws an IOException if the import is not complete, was not successful or was canceled.
Return: The CADModel for a successful file import.
-
double
GetImportTime() Get the number of milliseconds it took DWG to read the DWG file. Throws an IOException if the import is not complete, was not successful or was canceled.
-
double
GetParseTime() Get the number of milliseconds it took Visualize to parse the DWG data and create the corresponding scene graph. Throws an IOException if the import is not complete, was not successful or was canceled.
-
ImportNotifier() The default constructor creates an ImportNotifier object which is not tied to any file import.
-
ImportNotifier(HPS.DWG.ImportNotifier in_that)
-
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.
-
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.
-
override void
-
class
ImportOptionsKit: public HPS.SprocketKit The HPS.DWG.ImportOptionsKit class is a user space object. It contains settings controlling what and how data is imported via DWG. Calling HPS.DWG.ImportOptionsKit.GetDefault() will return an options kit with values found in here.
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.DWG.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.DWG.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.DWG.ImportOptionsKit in_kit) Copies the source ImportOptionsKit into this ImportOptionsKit.
Param in_kit: The source ImportOptionsKit to copy.
-
HPS.DWG.ImportOptionsKit
SetLogging(string in_log_file) Sets whether to log internal HPS.DWG calls.
Param in_log_file: File name which will contain logging information. Return: A reference to this ImportOptionsKit.
-
HPS.DWG.ImportOptionsKit
SetMaxTessellationDeviation(double in_deviation) Sets the maximum tessellation deviation. This corresponds to the value returned by AcGiCommonDraw.deviation()
Param in_deviation: Maximum deviation from tessellation. Return: A reference to this ImportOptionsKit.
-
HPS.DWG.ImportOptionsKit
SetTextureDirectories(string[] in_texture_directories)
-
HPS.DWG.ImportOptionsKit
SetUnreferencedRecords(bool in_state) Sets whether to import block table records which are not referenced in the drawing.
Param in_state: Whether to import block table records which are not referenced in the drawing. Return: A reference to this ImportOptionsKit.
-
void
Show(out HPS.DWG.ImportOptionsKit out_kit) Copies this ImportOptionsKit into the given ImportOptionsKit.
Param out_kit: The ImportOptionsKit to populate with the contents of this ImportOptionsKit.
-
bool
ShowLogging(out string out_log_file) Shows the logging import setting.
Param out_log_file: The file which will contain the logging information. Return: true if logging setting was specified, false otherwise.
-
bool
ShowMaxTessellationDeviation(out double out_deviation) Shows the maximum tessellation deviation import setting.
Param out_deviation: The maximum tessellation deviation setting for this import. Return: true if a maximum tessellation deviation was specified, false otherwise.
-
bool
ShowTextureDirectories(out string[] out_texture_directories)
-
bool
ShowUnreferencedRecords(out bool out_state) Shows the unreferenced records import setting.
Param out_state: The unreferenced record setting for this import. Return: true if an unreferenced record setting was specified, false otherwise.
-
HPS.DWG.ImportOptionsKit
UnsetEverything() Removes all settings from this ImportOptionsKit.
Return: A reference to this ImportOptionsKit.
-
HPS.DWG.ImportOptionsKit
UnsetLogging() Removes the logging import state.
Return: A reference to this ImportOptionsKit.
-
HPS.DWG.ImportOptionsKit
UnsetMaxTessellationDeviation() Removes the maximum tessellation deviation import state.
Return: A reference to this ImportOptionsKit.
-
HPS.DWG.ImportOptionsKit
UnsetTextureDirectories() Removes the texture directory state.
Return: A reference to this ImportOptionsKit.
-
HPS.DWG.ImportOptionsKit
UnsetUnreferencedRecords() Removes the unreferenced records import state.
Return: A reference to this ImportOptionsKit.
Public Static Functions
-
HPS.DWG.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.DWG.ImportOptionsKit a, HPS.DWG.ImportOptionsKit b)
-
bool
operator==(HPS.DWG.ImportOptionsKit a, HPS.DWG.ImportOptionsKit b)
-
override void
-
class
Layer: public HPS.DWG.Component The Layer class is a user space object. It allows users to turn layers imported through DWG on or off.
Public Functions
-
override void
Dispose()
-
bool
Equals(HPS.DWG.Layer in_layer) Check if the source Layer is equivalent to this Layer.
Return: true if the objects are equivalent, false otherwise.
-
override bool
Equals(Object obj)
-
override int
GetHashCode()
-
bool
IsOn()
-
Layer(HPS.Component in_that) This constructor creates a Layer object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of an DWG.Layer object. Otherwise the copy will fail and the resulting DWG.Layer will be invalid.
Param in_that: The source Component to copy.
-
Layer(HPS.DWG.Component in_that) This constructor creates a Layer object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of an DWG.Layer object. Otherwise the copy will fail and the resulting DWG.Layer will be invalid.
Param in_that: The source Component to copy.
-
Layer(HPS.DWG.Layer in_layer) The copy constructor creates a new Layer object that contains the same settings as the source Layer.
-
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
TurnOff()
-
void
TurnOn()
Public Static Functions
-
bool
operator!=(HPS.DWG.Layer a, HPS.DWG.Layer b)
-
bool
operator==(HPS.DWG.Layer a, HPS.DWG.Layer b)
-
override void
-
class
Layout: public HPS.Capture Public Functions
-
override void
Dispose()
-
IntPtr
GetDWGObjectID() Gets the AcDbObjectId corresponding to this DWGLayout.
Return: The AcDbObjectId corresponding to this DWGLayout.
-
Layout() The default constructor creates an uninitialized DWG.Layout object. The Type() function will return Type.None.
-
Layout(HPS.Capture in_that) This constructor creates an DWG.Layout object that shares the underlying smart-pointer of the source Layout. The copy will only be successful if the source layout is really an upcast of an DWG.Layout object. Otherwise the copy will fail and the resulting DWG.Layout will be invalid.
Param in_that: The source Layout to copy.
-
Layout(HPS.Component in_that) This constructor creates a Layout object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of a DWG.Layout object. Otherwise the copy will fail and the resulting DWG.Layout will be invalid.
Param in_that: The source Component to copy.
-
Layout(HPS.DWG.Layout in_that) The copy constructor creates an DWG.Layout object that shares the underlying smart-pointer of the source DWG.Layout.
Param in_that: The source DWG.Layout 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.
-
override void
-
class