Archicad 28 C++ API
Loading...
Searching...
No Matches
ACAPI::Library::v1::GSMObject Class Referencefinal

GSMObject is the representation of a loaded .gsm file. More...

#include <GSMObject.hpp>

Inheritance diagram for ACAPI::Library::v1::GSMObject:
ACAPI::v1::Object

Public Types

enum class  CopyMethod { GenerateNewUnID , KeepMainGuid }
 Control flags for the copy of the GSM objects. More...
 

Public Member Functions

ACAPI::Result< void > CopyTo (const IO::Location &fileLocation, CopyMethod method=CopyMethod::KeepMainGuid)
 Creates a new copy from the GSM file to a location.
 
ACAPI::Result< void > Modify (const std::function< GSErrCode(Modifier &)> &modifierFunc, GS::UniString password=GS::EmptyUniString)
 Opens a modification scope if the object is editable. See 'IsEditable'.
 
bool IsEditable () const
 A GSM file is editable if it is loaded from the local file system. GSM files from Loaded Libraries should be copied into a local directory before editing.
 
ACAPI::Result< GS::UnID > GetUnID () const
 The UnID is a combination of the main guid and the revision guid.
 
ACAPI::Result< bool > IsPlaceable () const
 The object can be placed in a plan file.
 
ACAPI::Result< bool > IsPasswordProtected () const
 The object is password protected and encrypted.
 
ACAPI::Result< GS::UnID > GetSubTypeUnID () const
 The UnID of the object's direct ancestor in the subtype hierarchy.
 
ACAPI::Result< bool > IsSubType () const
 The object is an 'object subtype'.
 
ACAPI::Result< bool > IsInSubTypeOf (const GS::UnID &subTypeID) const
 The object is a subtype of the given UnID.
 
bool HasMasterScript () const
 Checks whether MasterScript has value or is empty.
 
bool Has2DScript () const
 Checks whether 2DScript section has value or is empty.
 
bool Has3DScript () const
 Checks whether 3DScript section has value or is empty.
 
bool HasPropertiesScript () const
 Checks whether PropertiesScript section has value or is empty.
 
bool HasParameterScript () const
 Checks whether ParameterScript section has value or is empty.
 
bool HasInterfaceScript () const
 Checks whether InterfaceScript section has value or is empty.
 
bool HasForwardMigrationScript () const
 Checks whether ForwardMigrationScript section has value or is empty.
 
bool HasBackwardMigrationScript () const
 Checks whether BackwardMigrationScript section has value or is empty.
 
bool Has2DVectorImage () const
 Checks whether 2DVectorImage section has value or is empty.
 
bool HasPreviewPicture () const
 Checks whether PreviewPicture section has value or is empty.
 
bool HasGDLPictures () const
 Checks whether GDLPictures section has value or is empty.
 
bool HasCustomSection (uint32_t sectionTypeID, uint16_t index) const
 Checks whether CustomSection has value or is empty.
 
ACAPI::Result< GS::UniString > GetAuthor () const
 Author of the object.
 
ACAPI::Result< GS::UniString > GetLicense () const
 License name of the object.
 
ACAPI::Result< GS::UniString > GetLicenseVersion () const
 License version of the object.
 
ACAPI::Result< GS::UniString > GetDescription () const
 Description of the object.
 
ACAPI::Result< GS::UniString > GetKeywords () const
 Keywords of the object. Mostly used for search. Usually it is a comma separated list.
 
ACAPI::Result< GDL::Parameters > GetParameters () const
 Parameter list of the object.
 
ACAPI::Result< std::vector< GS::UniString > > GetParameterDescriptions () const
 Parameter descriptions of the object.
 
ACAPI::Result< GS::UniString > GetMasterScript (const GS::UniString &password=GS::EmptyUniString) const
 Master script of the object.
 
ACAPI::Result< GS::UniString > Get2DScript (const GS::UniString &password=GS::EmptyUniString) const
 2D script of the object.
 
ACAPI::Result< GS::UniString > Get3DScript (const GS::UniString &password=GS::EmptyUniString) const
 3D script of the object.
 
ACAPI::Result< GS::UniString > GetPropertiesScript (const GS::UniString &password=GS::EmptyUniString) const
 Properties script of the object.
 
ACAPI::Result< GS::UniString > GetParameterScript (const GS::UniString &password=GS::EmptyUniString) const
 Parameter script of the object.
 
ACAPI::Result< GS::UniString > GetInterfaceScript (const GS::UniString &password=GS::EmptyUniString) const
 Interface script of the object.
 
ACAPI::Result< bool > IsUIDefault () const
 The defined interface is set as default UI.
 
ACAPI::Result< bool > IsHierarchicalPagesUsed () const
 The defined interface uses hierarchical pages.
 
ACAPI::Result< GS::UniString > GetForwardMigrationScript (const GS::UniString &password=GS::EmptyUniString) const
 Forward Migration script of the object.
 
ACAPI::Result< GS::UniString > GetBackwardMigrationScript (const GS::UniString &password=GS::EmptyUniString) const
 Backward Migration script of the object.
 
ACAPI::Result< VectorImage > Get2DVectorImage () const
 2D Vector Image of the object.
 
ACAPI::Result< GX::ImageRef > GetPreviewPicture () const
 Preview picture of the object.
 
ACAPI::Result< std::vector< GX::ImageRef > > GetGDLPictures () const
 Embedded pictures of the object.
 
ACAPI::Result< GSMSectionDataGetCustomSection (uint32_t sectionID, uint16_t index=0) const
 Custom section data of the object.
 
ACAPI::Result< void > SetPlaceable (bool placeable)
 Sets the placeable flag of the object. If true, the object can be placed in a plan file.
 
ACAPI::Result< void > SetPassword (const GS::UniString &newPassword)
 Sets the password of the object. If a password is set, it will encrypt and lock the object.
 
ACAPI::Result< void > SetIsSubtype (bool isSubType)
 Sets the object as a subtype.
 
ACAPI::Result< void > SetAuthor (const GS::UniString &author)
 Sets the author of the object.
 
ACAPI::Result< void > SetLicense (const GS::UniString &license)
 Sets the license code of the object.
 
ACAPI::Result< void > SetLicenseVersion (const GS::UniString &licVer)
 Sets the license version of the object.
 
ACAPI::Result< void > SetDescription (const GS::UniString &description)
 Sets the description of the object.
 
ACAPI::Result< void > SetKeywords (const GS::UniString &keywords)
 Sets the keywords of the object. That is used by several search tools. Usually it is a comma separated list.
 
ACAPI::Result< void > SetParameters (const GDL::Parameters &newParamList, const std::vector< GS::UniString > &descriptions)
 Sets the parameters of the object. This function will replace the entire parameter list.
 
ACAPI::Result< void > MergeParameters (const GDL::Parameters &newParamList, const std::vector< GS::UniString > &descriptions)
 Merges new parameters to the object. This function will add new parameters and replace the existing ones.
 
ACAPI::Result< void > SetMasterScript (const GS::UniString &script)
 Sets the master script. This function will replace the existing master script. If it is empty, the script will NOT be deleted but set to empty.
 
ACAPI::Result< void > Set2DScript (const GS::UniString &script)
 Sets the 2D script. This function will replace the existing 2D script. If it is empty, the script will NOT be deleted but set to empty.
 
ACAPI::Result< void > Set3DScript (const GS::UniString &script)
 Sets the 3D script. This function will replace the existing 3D script. If it is empty, the script will NOT be deleted but set to empty.
 
ACAPI::Result< void > SetPropertiesScript (const GS::UniString &script)
 Sets the properties script. This function will replace the existing properties script. If it is empty, the script will NOT be deleted but set to empty.
 
ACAPI::Result< void > SetParameterScript (const GS::UniString &script)
 Sets the parameter script. This function will replace the existing parameter script. If it is empty, the script will NOT be deleted but set to empty.
 
ACAPI::Result< void > SetInterfaceScript (const GS::UniString &script)
 Sets the interface script. This function will replace the existing interface script. If it is empty, the script will NOT be deleted but set to empty.
 
ACAPI::Result< void > SetUIDefault (bool isDefault)
 Sets the interface as default.
 
ACAPI::Result< void > SetHierarchicalPagesUsed (bool hierarchicalPagesUsed)
 Sets the interface uses hierarchical pages.
 
ACAPI::Result< void > SetForwardMigrationScript (const GS::UniString &script)
 Sets the forward migration script. This function will replace the existing forward migration script. If it is empty, the script will NOT be deleted but set to empty.
 
ACAPI::Result< void > SetBackwardMigrationScript (const GS::UniString &script)
 Sets the backward migration script. This function will replace the existing backward migration script. If it is empty, the script will NOT be deleted but set to empty.
 
ACAPI::Result< void > Set2DVectorImage (const VectorImage &image)
 Sets a vector image as 2D symbol. This function will replace the existing 2D symbol. If it is empty, the symbol will NOT be deleted but set to empty.
 
ACAPI::Result< void > SetPreviewPicture (const GX::ImageRef &image)
 Sets the preview picture.
 
ACAPI::Result< void > SetGDLPictures (const std::vector< GX::ImageRef > &images)
 Sets the pictures which are referred from th GDL scripts.
 
ACAPI::Result< void > SetCustomSection (uint32_t sectionTypeID, uint16_t index, const GSMSectionData &data)
 Sets a custom section.
 
ACAPI::Result< void > DeleteMasterScript ()
 Deletes the master script.
 
ACAPI::Result< void > Delete2DScript ()
 Deletes the 2D script.
 
ACAPI::Result< void > Delete3DScript ()
 Deletes the 3D script.
 
ACAPI::Result< void > DeletePropertiesScript ()
 Deletes the properties script.
 
ACAPI::Result< void > DeleteParameterScript ()
 Deletes the parameter script.
 
ACAPI::Result< void > DeleteInterfaceScript ()
 Deletes the interface script.
 
ACAPI::Result< void > DeleteForwardMigrationScript ()
 Deletes the forward migration script.
 
ACAPI::Result< void > DeleteBackwardMigrationScript ()
 Deletes the backward migration script.
 
ACAPI::Result< void > Delete2DVectorImage ()
 Deletes the 2D Vector image.
 
ACAPI::Result< void > DeletePreviewPicture ()
 Deletes the preview picture.
 
ACAPI::Result< void > DeleteGDLPictures ()
 Deletes GDL pictures.
 
ACAPI::Result< void > DeleteCustomSection (uint32_t sectionID, uint16_t index=0)
 Deletes a custom section.
 
- Public Member Functions inherited from ACAPI::v1::Object
 Object (std::shared_ptr< Impl::ObjectImpl > impl)
 Constructs a new object.
 
const API_TokenGetToken () const
 Get the token for this object.
 

Static Public Member Functions

static ACAPI::Result< GSMObjectCreateNew (const IO::Location &fileLocation, const ACAPI::Library::v1::GSMObject &ancestorSubType)
 Creates a new empty GSM Object.
 

Additional Inherited Members

- Protected Member Functions inherited from ACAPI::v1::Object
 ~Object ()
 Default destructor.
 
- Protected Attributes inherited from ACAPI::v1::Object
std::shared_ptr< Impl::ObjectImplmImpl
 Impl object given by constructor.
 

Detailed Description

GSMObject is the representation of a loaded .gsm file.

The modifier object of the GSMObject.

A GSMObject can represent a .gsm file which is loaded from the local file system or loaded from a library. Only GSM objects loaded from file can be modified.

Since
Archicad 28