Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




AcmStandard Manager

autocad en


AcmStandard Manager

This class is inherited from AcRxService.

AcmStandardManager is repressible to provide access to overall standard functionality, to provide a bridge between AcmStandard related classes and AcmSymbol related classes. For example, when creating a welding symbol, an AcmWelding object asks the AcmStandardManager for the connection to a standard object so that AcmWelding object does not need to know where this standard object is located when attaching a new symbol standard.



Developers have access to the AcmStandardManager class only.

virtual void getDefaultStd(CString& stdName) const;

Returns the name of the default standard.

virtual Adesk::Boolean edit(CWnd* pParentWnd = NULL) = 0;

Provides the general interface for editing settings of standards. Displays a list of installed standards (ARX definition) and currently presented standards in the drawing file. Then it is possible to call edit member functions for each standard presented in a drawing. The general rule is that you can call edit functions for standard objects saved in a drawing only. Return value means that preferences for the standard have changed and that symbols need to be regenerated.

The same dialog can be obtained by calling command AMSYMSTD.

virtual Acm::ErrorStatus setCurrent(const AcDbObjectId& stdId, AcDbDatabase *pDb = NULL) = 0;

Sets the current standard using its Id. For developers only. It is used to create symbols programmatically, for example from ARX.

virtual Acm::ErrorStatus setCurrent(LPCTSTR name, AcDbDatabase *pDb = NULL) = 0;

Sets the current standard using its name by locating the standard object saved in a drawing. If there is no such standard in a drawing, it returns eInvalidName.

virtual Acm::ErrorStatus getCurrent(CString& name, AcDbDatabase *pDb = NULL) const = 0;

Returns some kind of error if there is no standard saved in a drawing. Do not confuse this with the system variable containing the string "Standard name".

virtual Acm::ErrorStatus getCurrent(AcDbObjectId& stdId, AcDbDatabase *pDb = NULL) const = 0;

Returns the object id of the current standard or the error code if there is no standard saved in a drawing.

virtual Acm::ErrorStatus addStandard(AcDbObjectId& stdId, AcmStandard *pNewStd, Adesk::Boolean setCurrent = Adesk::kTrue, AcDbDatabase *pDb = NULL) = 0;

virtual Acm::ErrorStatus addStandard(AcDbObjectId& stdId, LPCTSTR pNewStdName, LPCTSTR pBaseStdName, Adesk::Boolean setCurrent = Adesk::kTrue, AcDbDatabase *pDb = NULL) = 0;

Specific interface for adding standards to drawing file. Needs to be called only in case specific initialization needs to be done before the standard is placed into drawing, or if users don't want the standard to become current.

virtual Acm::ErrorStatus removeStandard(const AcDbObjectId& stdId) = 0;

Member function to erase standard. It is just for convenience - the same result can be obtained by opening standard and calling erase().

virtual Adesk::Boolean getStd(LPCTSTR pStdName , AcDbObjectId &objId, AcDbDatabase *pDb=NULL) const = 0;

Returns the object Id of the standard having the specified name. This function will have a different result if the database has active long transaction.

virtual Acm::ErrorStatus getStandards(AcDbObjectIdArray& stdIdArray, AcDbDatabase *pDb = NULL) const = 0;

Fills stdIdArray with all standards in a drawing. This function will have a different result if the database has active long transaction.

virtual Acm::ErrorStatus getAllStandardNames(CStringArray& stdNames) const = 0;

Fills stdNames with the names of all standards, which are either present in a drawing, or are available and can be inserted.

virtual Acm::ErrorStatus getXRefStandards(CMap<CString,LPCTSTR,AcDbObjectId,const AcDbObjectId&>& stdList) const = 0;

This member function is not implemented and doesn't return any useful data. Users can, however, use getStandards and supply an xref database and it will return the list of standards present in the xref database.

virtual Acm::ErrorStatus getRegisteredStd(LPCTSTR baseClass,AcDbVoidPtrArray& arrayOfStandards) const = 0;

Fills the arrayOfStandards with pointers to AcRxClass object, derived from base class. If the initial parameter is empty, AcmStandard is used.

virtual Acm::ErrorStatus renameStd(AcDbObjectId &stdId, const char* newName) = 0;

Resets the name of standard. Users should be careful when using this member function, because it will have influence on the result of the isOriginal() member function.

virtual Acm::ErrorStatus registerStdBasedOn(const AcDbObjectId &baseStdId,const char* stdName, AcDbObjectId &stdId) = 0;

PLEASE NOTE: Creates a copy of the standard and sets the given name. The name must be unique in the drawing. It works just in ONE database. Do not try to use it for cloning between databases; use wblockCloneObjects instead.

virtual Acm::ErrorStatus updateSymbols(AcDbDatabase *pDb = NULL) = 0;

Scans the database for all symbols and calls regeneration member functions of them. This regenerates them using the current standard values. It regenerates symbols which depend only on the current standard (which can be edited).

virtual int numStandards(AcDbDatabase *pDb = NULL) const = 0;

Returns the number of standards used in the current drawing.

Two new methods have been added to AcmStandardManager and one new reactor class is being exposed:

virtual void attachReactor(AcmStdReactor* pReactor) = 0;

virtual void removeReactor(AcmStdReactor* pReactor) = 0;

Used for attaching and detaching the AcmStandardReactor class to the standard manager. Once you attach the reactor, it must not be deleted without first detaching the reactor from the list. If the reactor is not detached before being deleted, the system will crash when sending the notification to the object, which won't be valid.

AcmStdReactor

This release features a new reactor class. You may want to override several of its notification to control your applications more precisely.

virtual void onNewStandard(AcmStandard *pNewStd)

Use this callback to populate a standard with your implemented standard. You must not use workingDatabase to access the standard's data.. You should use the database that comes with Object IDs.

virtual void onChanged(const AcmStandard* pStd, Acm::StdVariable var)

Use this callback to react to changes to the basic standard setting, such as attachment for lists, units, text height, text style, arrowhead type. Var specifies which portion of the standard has changed. Once you know that a change has occurred, you can get your symbol standard and update accordingly.

virtual void onChanged(const AcmSymbolStd* pSymStd)

Use this callback to react to changes to the symbol standard setting. This can be used to react to changed settings, if the dependent entity isn't a symbol and so didn't receive the regen() callback. This callback is implemented for standards, which do not yet have their own symbols (section line, thread line).

virtual void onRemoved(const AcmStandard* pStd)

This callback is used to obtain the notification when we are going to remove the standard. This callback is going to be used in the setup dialog to react to erasing the standard. You could use it for other purposes as well. The object will already be destroyed when this notification is received.

virtual void onSetCurrentStd(AcDbObjectId& oldCurrentStandard, AcDbObjectId& newCurrentStdId)

This callback is used when we need to monitor changes to the current standard.


Document Info


Accesari: 1277
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )