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




BOM Manager

autocad en


ALTE DOCUMENTE

AcmCLeader
BOM Manager

BOM Manager

This class is inherited from AcRxService.

This class, called AcmBOMManager, should work much the same way that the standard manager works for standards. It primarily gets the current BOM, list BOMs, and gets their names.

For this release, AcmBOMManager has been extended with new methods containing AmiCompDefKey and AmiCompKey. These methods are: createBomTable, getBomTable, existBomTable, getPartData, setPartData, createItem, getItemData, addItemReference, removeItemReference, getItemReferences. All these methods use Ami*Key in place of AcDbObjectId or AcDbObjectIdArray.



No change required in existing applications.

virtual Acad::ErrorStatus createBomTable(AcDbObjectId& aNewBomTableId,

const AcDbObjectId targetId = AcDbObjectId::kNull, LPCTSTR name = NULL) = 0;

virtual Acad::ErrorStatus createBomTable(AcDbObjectId& aNewBomTableId,

const AmiCompDefKey* pTargetKey, LPCTSTR name = NULL) = 0;

Creates a new BOM table for the specified target. If targetId is kNull, then a Main BOM table is created. Each target can have a maximum of one BOM table associated with it. If there is already a BOM table, then the eDuplicateEntry error code is returned. The created BOM table is placed in the dwg file at the appropriate place and closed. The name must be used and must not be an empty string or NULL.

virtual Acad::ErrorStatus createBorderBomTable(AcDbObjectId& aNewBomTableId,

const AcDbObjectId borderId,LPCTSTR name = NULL) = 0;

Creates a new BOM table for the specified borderId. For more information see the description of the createBomTable function above.

virtual Acad::ErrorStatus removeBomTable(const AcDbObjectId& bomTableId) = 0;

Removes the BOM table from the current drawing.

virtual Acad::ErrorStatus getBomTable(AcDbObjectId& aBomTableId,CString& name,

const AcDbObjectId& targetId) const = 0;

virtual Acad::ErrorStatus getBomTable(AcDbObjectId& aBomTableId,CString& name,

const AmiCompDefKey* pTargetId) const = 0;

Returns the Id of the BOM table associated with the assembly (subassembly) present.

If the table doesn't exist, this function returns eKeyNotFound. The name symbol will contain the BOM table name.

If tabRecId is kNull, then the main BOM table Id is returned.

virtual Acad::ErrorStatus getBorderBomTable(AcDbObjectId& aBomTableId,CString& name,

const AcDbObjectId& borderId) const = 0;

Returns Id of the BOM Table associated with some borderId.

If the table doesn't exist, returns eKeyNotFound. The name symbol will contain the BOM table name.

virtual Acad::ErrorStatus existBomTable(const AcDbObjectId& targetId = AcDbObjectId::kNull) const = 0;

virtual Acad::ErrorStatus existBomTable(LPCTSTR name) const = 0;

virtual Acad::ErrorStatus existBomTable(const AmiCompDefKey* pTargetKey) const = 0;

Checks whether the BOM Table for the specified target exists. If targetId is kNull, then the main BOM table is checked. Each target can have a maximum of one BOM table associated with it. If there is already a BOM Table, the eDuplicateEntry error code is returned.

virtual Acad::ErrorStatus getAllBomTables(AcDbObjectIdArray& array,

Adesk::Boolean xrefed = Adesk::kFalse) const = 0;

Returns the list of all BOM tables in the current drawing and all xrefed drawings (if xrefInc is kTrue).

virtual Acad::ErrorStatus getCurrentBom(AcDbObjectId& bomId) const = 0;

Gets the current BOM table.

virtual Acad::ErrorStatus setCurrentBomTarget(const AcDbObjectId& targetId) = 0;

virtual Acad::ErrorStatus setCurrentBom(const AcDbObjectId& bomId) = 0; 16416n1312q

Specifies the current BOM, to be used for editing and querying purposes. The target modification enables you to use the selected target to set up the current BOM.

virtual Acad::ErrorStatus getBomData(const AcDbObjectId& bomId,CString& name,

CMapStringToString& valueMap) const = 0;

Gets the main data that describes the BOM table, such as name, material, vendor, and so on, along with a list of other values. The function returns all actual values together with their names. the name symbol is used to specify BOM table name. The data is used as item data if you attach the BOM table's assembly to the upper level assembly. The BOM table data doesn't contain item number or number of items.

virtual Acad::ErrorStatus setBomData(const AcDbObjectId& bomId, LPCTSTR name,

const CMapStringToString& valueMap) const = 0;

Sets main BOM data. If the BOM table already contains data, all of the previous data will be removed and the new data will be inserted. If it doesn't, new data are created and initialized using valueMap. The BOM table data doesn't contain item number or number of items.

virtual Acad::ErrorStatus getBomProiperties(.) const = 0;

virtual Acad::ErrorStatus setBomProiperties(.) const = 0;

virtual Acad::ErrorStatus applySort(.) const = 0;

virtual AcmIterator* newItemIterator(const AcDbObjectId& bomId,

Acm::PartListDirection sort =Acm::kTopDown,

Adesk::Boolean expanded = Adesk::kFalse) const = 0;

virtual AcmIterator* newItemIterator(const AcDbObjectId& bomId,

const AcmCPartList* pSymb,

Adesk::Boolean expanded = Adesk::kFalse) const = 0;

The BOM iterator is used to iterate through all items in the BOM table in the specified order. The created class must be deleted at the caller's request. The sort parameter specifies whether to take the current sort state or not. If not, the items are sorted in the same order as created. The expand parameter specifies if it will include expanded (shaded in dialog) items as well.

virtual Acad::ErrorStatus getBomPartsLists(const AcDbObjectId& bomId, AcDbObjectIdArray& partsListIdArray) const = 0;

Returns list of parts lists associated with the BOM table.

virtual Acad::ErrorStatus createPartData( const AcDbObjectId& partId,

const CMapStringToString& valueMap) const = 0;

Creates part data for the specified part. If the part already has data associated with it, this function returns eAlreadyInDb. The part data is initialized using valueMap. The part data doesn't contain an item number. The number of items is initialized when the reference to the part is created.

virtual Acad::ErrorStatus getPartData(const AcDbObjectId& referenceId,

Adesk::UInt32& numOfItems ,

CMapStringToString& valueMap) const = 0;

virtual Acad::ErrorStatus getPartData(const AmiCompKey* pCompKey,

Adesk::UInt32& numOfItems ,

CMapStringToString& valueMap) const = 0;

virtual Acad::ErrorStatus getPartData(const AcDbObjectId& partId,

CMapStringToString& valueMap) const = 0;

Checks whether the part reference is one of the known types of isKindOf(AcDbBlockReference or AcDbPartRef). Otherwise returns eIllegalEntityType. If the part reference has DataEntry associated, this function returns all actual values together with their names. Otherwise, it returns eKeyNotFound. The part data doesn't contain an item number. The number of items returned is associated with the part reference only. The second one can be used together with Iterator.

virtual Acad::ErrorStatus setPartData(const AcDbObjectId& referenceId,

Adesk::UInt32 numOfItems,

const CMapStringToString& valueMap, Adesk::Boolean = Adesk::kFalse) const = 0;

virtual Acad::ErrorStatus setPartData(const AmiCompKey* pCompKey,

Adesk::UInt32 numOfItems,

const CMapStringToString& valueMap, Adesk::Boolean = Adesk::kFalse) const = 0;

virtual Acad::ErrorStatus setPartData(const AcDbObjectId& partId,

const CMapStringToString& valueMap) const = 0;

Sets the BOM data for the specified reference to a part. If the part already has data associated with it, then all of the previous data will be removed and the new data will be inserted. If the part doesn't have BOM data associated, new data is created and initialized using valueMap. The part data doesn't contain an item number. The number of items is initialized to one by default and is stored on a per-reference basis.

virtual AcmIterator* newPartDataIterator(Adesk::Boolean mainOnly = Adesk::kFalse,

Adesk::Boolean noXref = Adesk::kTrue) const = 0;

The BOMdata iterator is used to iterate through all BOM data in the current .dwg and in all xref-ed drawings. The created class must then be deleted at the caller's request. If mainOnly is true, then only data associated with any BOM table will be returned.

virtual Acad::ErrorStatus createItem(AcDbObjectId& itemId,

const AcDbObjectId& bomId,

const AcDbObjectIdArray& refIdArray,

LPCTSTR itemNo) const = 0;

virtual Acad::ErrorStatus createItem(AcDbObjectId& itemId,

const AcDbObjectId& bomId,

const AmiCompKey* pCompKey,

LPCTSTR itemNo) const = 0;

Checks whether reference Id has BOM data associated with it. If yes, this function creates a new item in the current BOM table and associates the reference with the row. If no, eKeyNotFound is returned. If the itemNo string is used, its value is used to initialize the item number for the created row. If NULL or an empty value is used, the function finds the last one and initializes the new item with last+1. If the number of items is the default, the BOM table will try to determine the actual number of items. Otherwise it will use the specified value and let the user determine the number of items. Created items can be removed by opening as AcDbObject and erasing it from the drawing. setCurrentBom must be called prior to use.

virtual Acad::ErrorStatus createItem(AcDbObjectId& itemId,

const AcDbObjectId& bomId,

LPCTSTR itemNo,

Adesk::UInt32 qty,

const CMapStringToString& valueMap) const = 0;

This function allows new unassociated items to be created. It creates new NOM data, initializes this data using valueMap, and then creates the new item. ValueMap can contain any amount of data, similar to setBomPartData.

virtual Acad::ErrorStatus setItemData(const AcDbObjectId& itemId,

LPCTSTR itemNo,

Adesk::UInt32 qty,

const CMapStringToString& valueMap) const = 0;

Sets Item values. Item number and number of items are specific to this item. Other data (such as valueMap) are shared by other BOM tables as well. ValueMap contains the pairs column's name -- value. valueMap contains the column name of the pair. ValueMap is checked against the current BOM standard. If the map contains unknown entries, then the name doesn't match to any column defined in the BOM standard and it is stripped from the map. If you try to call setItemData on an expanded item, it returns eInvalidContext. If you try to set the number of items (other than -1), which is calculated automatically, it returns eInvalidData.

virtual Acad::ErrorStatus getItemData(const AcDbObjectId& itemId,

CString& itemNo,

Adesk::UInt32& qty,

CMapStringToString& valueMap,

const AcDbObjectId& bomStdId=AcDbObjectId::kNull) const = 0;

virtual Acad::ErrorStatus getItemData(const AcDbObjectId& refId,

const AcDbObjectId& bomId,

AcDbObjectId& itemId,

CString& itemNo,

Adesk::UInt32& qty,

CMapStringToString& valueMap,

const AcDbObjectId& bomStdId=AcDbObjectId::kNull) const = 0;

virtual Acad::ErrorStatus getItemData(const AmiCompKey* pCompKey,

const AcDbObjectId& bomId,

AcDbObjectId& itemId,

CString& itemNo,

Adesk::UInt32& qty,

CMapStringToString& valueMap

const AcDbObjectId& bomStdId=AcDbObjectId::kNull) const = 0;

Gets Item values - item number and quantity are specific to this item, other data (valueMap) are shared with other BOM tables as well. ValueMap contains pairs of column's name and value. ValueMap is created using the current BOM standard, so it contains only those values that match the BOM table's column definitions.

virtual Acad::ErrorStatus getItemStatus(const AcDbObjectId& itemId,

Adesk::Boolean& isAutoCalcEnabled,

Adesk::Boolean& isExpanded,

Adesk::Boolean& isExpandable) const =0;

Returns the status of the item. IsAutoCalcEnabled is the status variable, which specifies whether to calculate the quantity for the specified item. IsExpanded is a status variable that contains information about the current expansion status of the item. IsExpandable is a status variable telling if it is possible to expand the item.

virtual Acad::ErrorStatus setAutoCalc(const AcDbObjectId& rowId,

Adesk::Boolean isAutoCalcEnabled) const =0;

Sets the autoCalc status for item.

virtual Acad::ErrorStatus expandItem(const AcDbObjectId& itemId,

Adesk::Boolean expand = Adesk::kTrue) const = 0;

Expands or collapses the item to include or exclude inherited items from the subassembly. If the item cannot be expanded, this function returns eNotApplicable. If the operation can't be completed successfully, no item is added. After this operation, the isExpanded status will change for the current item.

virtual Acad::ErrorStatus addPartGrfDef(const AcDbObjectId& referenceId,

const AcDbObjectId& newGrfDefId) const = 0;

Adds a graphical definition to represent the same part. Both definitions will use the same data, for example front view and bottom view of the same part.

virtual Acad::ErrorStatus removePartGrfDef(const AcDbObjectId& referenceId) const = 0;

Removes the graphical definition of the part. This graphical definition will no longer represent the part. This function determines which BOM data is associated with it and then removes its definition. If the definition is referenced, references will be removed as well.

virtual Acad::ErrorStatus getPartGrfDefs(const AcDbObjectId& referenceId,

AcDbObjectIdArray& refIdArray,

AcDbIntArray&numOfItAr) const = 0;

Returns a list of all references to the same part, together with the number of items. As the input parameter, you can use any of the part references.

virtual Acad::ErrorStatus addItemReference(const AcDbObjectId& itemId,

const AcDbObjectIdArray& refIdArray) const = 0;

virtual Acad::ErrorStatus addItemReference(const AcDbObjectId& itemId,

const AmiCompKey* pCompKey) const = 0;

Adds a reference to the item. The reference is validated before it is appended. If the reference is BlockReference, then its BlockTableRecord has to be associated with the BOM data.

virtual Adesk::Boolean existItemReference(const AcDbObjectId& itemId,

const AcDbObjectIdArray& refIdArray) const = 0;

virtual Adesk::Boolean existItemReference(const AcDbObjectId& itemId,

const AmiCompKey* pCompKey) const = 0;

Checks to determine whether the specified item reference exists.

virtual Acad::ErrorStatus removeItemReference(const AcDbObjectId& itemId,

const AcDbObjectIdArray& refIdArray) const = 0;

virtual Acad::ErrorStatus removeItemReference(const AcDbObjectId& itemId,

const AmiCompKey* pCompKey) const = 0;

Removes the reference to this item. If the reference has any balloons associated with it, they will be erased as well.

virtual Acad::ErrorStatus getItemReferences(const AcDbObjectId& itemId,

AcmCObjArray<AcDbObjectIdArray>& referenceArray,

AcDbIntArray& numItemArray) const = 0;

virtual Acad::ErrorStatus getItemReferences(const AcDbObjectId& itemId,

AcmCObjArray<AmiCompKey>& referenceArray,

AcDbIntArray& numItemArray) const = 0;

Returns a list of reference to the item, together with the number of items in the list.

virtual Acad::ErrorStatus getItemBalloons(const AcDbObjectId& itemId,

AcDbObjectIdArray& ballIdArray,

const AcDbObjectId& refId) const = 0;

Returns a list of balloons associated with the item (and reference). If reference Id is not used (== kNull), all balloons are returned.

virtual AcDbObjectId sheetBomTable(const AcDbObjectId& sheetId) const = 0;

Returns the id of the BOM table associated with given paper sheet Id.

virtual bool setSheetBomTable(const AcDbObjectId& sheetId,const AcDbObjectId& bomId) const = 0;

Sets the sheet Id to be associated with the given BOM table.

virtual void attachBomReactor(AcmBomReactor* pReactor) = 0;

virtual void removeBomReactor(AcmBomReactor* pReactor) = 0;

These two methods are used to attach and detach the BOM reactor. This reactor is then used to monitor changes being made to BOM data, items, part lists, and balloons.

virtual bool selectBomEntity(AcDbObjectIdArray& subentPath,const bool intoNested=false) = 0;

Service provided to programmers, which will highlight parts and their pick objects the same way as in the running product.

virtual Acad::ErrorStatus getItemRawData(const AcDbObjectId& itemId, CString& itemNo,

Adesk::UInt32& numOfItems, CMapStringToString& valueMap,

const AcDbObjectId& bomStdId=AcDbObjectId::kNull)const = 0;

New method. It returns attributes in unevaluated form, which means you can get NAME as '=<PART:NAME>', instead of 'PART1'. The standard Id is necessary to get correct default data, which is stored in the BOM standard's columns. All other parameters are identical to getItemData. No change required in existing applications.

AcmBOMManager::getItemData has a new parameter: BOM standard id. The standard Id is necessary to get correct default formulas, which are stored in the BOM standard. These are than evaluated and the result is returned in valueMap. Existing applications need to be recompiled and relinked.

AcmIterator

This class allows you to sequentially retrieve the objects in the BOM dictionary, and keeps track of what the last object retrieved was. The iterator is returned by the newPartDataIterator method of the BOM manager and the caller is responsible for its deletion.

virtual Adesk::Boolean done() = 0;

virtual Adesk::Boolean next() = 0;

virtual Adesk::Boolean setPosition(int idx) = 0;

virtual Adesk::Boolean setPosition(const AcDbObjectId& id) = 0;

virtual AcDbObjectId objectId() const = 0;

These methods are similar to the AcDbIterator and dictionary iterator.

virtual Acad::ErrorStatus getData(CMapStringToString& valueMap) const = 0;

Gets the value map data for the current item. The map is based on the current BOM standard.

virtual Acad::ErrorStatus setData(const CMapStringToString& valueMap) = 0;

Sets the data map for the current item. The map is checked against the current BOM table. Value, whose name is not found in the current BOM column list, is stripped from the map.

virtual int numEntries() const = 0;

Returns the quantity of the current item. This function sums all quantities in all BOM tables.

AcmBomReactor

This class is used to monitor all important changes made to items, BOM tables, and other objects associated with the BOM. The default implementation does nothing. If you want to receive any of these notifications, you must inherit your own class and register it to the BOM manager. It is important to unregister the reactor when it is no longer needed.

virtual void onNewBOMTable(const AcDbObjectId &newTableId, const AcDbObjectId &compId)

Called when a new BOM table is being created. CompId has a meaning in the context of Mechanical Desktop only - otherwise it will always contain a constant. In the MDT context, the CompId is the ID of the assembly for which the BOM table has been created. It should be used only as a key to the BOM tables, for example in the browser.

virtual void onRenameBOMTable(const AcDbObjectId &tableId, const LPCTSTR newName)

Called when the BOM table name is being changed.

virtual void onEraseBOMTable(const AcDbObjectId &tableId, const AcDbObjectId &compId)

Called when the BOM table is being removed. This is complex operation, because removing the BOM table means also removing balloons and parts lists associated with this BOM table. The data associated with each part is not affected.

virtual void onNewPartList(const AcDbObjectId &partList, const AcDbObjectId &bomId)

Called when a new parts list is being created.

virtual void onRenamePartList(const AcDbObjectId &partListId,const LPCTSTR &newname)

Called when changing the title of a parts list.

virtual void onErasePartList(const AcDbObjectId &partListId, const AcDbObjectId &bomId)

Called when erasing a parts list.

virtual void aboutToUpdatePartList(const AcDbObjectId& partListId)

Called when a parts list is reevaluating its items using filters.

Entry Operations

virtual void entryCreated(const AcDbObjectId& entryId)

Called when BOM data entry is being created, for example when the new AMPARTREF entity is added to database, or when new MDT part is being created. During this callback it is allowed to read the contents of the entry.

virtual void aboutToModifyEntry(const AcDbObjectId& entryId,LPCTSTR tag,LPCTSTR value)

virtual void entryModified(const AcDbObjectId& entryid)

Immediately before entry data is changed, the aboutToModifyEntry notification is sent. Whenever an entry is changed, the entryModified notification is sent.

virtual void entryEdit(const AcDbObjectId& entryId,CMapStringToString& dataMapList)

virtual bool isEntryEditImplemented()

If the reactor wants to display its own editing dialog for the entry's data, you must overload these two member functions. The second one - isEntryEditImplemented - must return true and entryEdit will present the editing dialog. At the time the entryEdit is being called, there is a dialog already opened and so you cannot use any ads_get. function calls.

Item Operations

virtual void itemCreated(const AcDbObjectId& itemId)

Called when an item is being created. If you want to know the name of the BOM table, you should get the owner of the item. To access item data, including item number and quantity, use the BOM Manager.

virtual void aboutToModifyItem(const AcDbObjectId& itemId,LPCTSTR tag,LPCTSTR value)

virtual void itemModified(const AcDbObjectId& itemId)

Encapsulates the modification of the item data, including the item number.

Part Reference Dialog Operations

virtual void onPartDlgStarted(const AcDbObjectId& entryId)

virtual void onPartDlgCanceled(const AcDbObjectId& entryId)

virtual void onPartDlgFinished(const AcDbObjectId& entryId)

These methods are called according the starting and finishing of the AMPARTREF dialog. The user may use this to handle the modification of the data, which needs to be passed to the external database and must reflect the current state of the data. Using onCanceled and onFinished, users may abort or commit the transaction, which may be started during onStarted notification.

BOM Dialog Operations

virtual void onBomDlgStarted(const AcDbObjectId& bomId)

virtual void onBomDlgCanceled(const AcDbObjectId& bomId)

virtual void onBomDlgFinished(const AcDbObjectId& bomId)

virtual void onBomDlgBomIdChanged(const AcDbObjectId& newBomId)

These methods are called according the starting and finishing the AMBOM dialog. The user may use this to handle the modification of the data, which needs to be passed to the external database and must reflect the current state of the BOM data. Using onCanceled and onFinished, users may abort or commit the transaction, which may be started during onStarted notification. Using onBomDlgBomIdChanged, users can change the table name of the external database.

Partlist Dialog Operations

virtual void onPartListDlgStarted(const AcDbObjectId& partListId)

virtual void onPartListDlgCanceled(const AcDbObjectId& partListId)

virtual void onPartListDlgFinished(const AcDbObjectId& partListId)

These methods are called according the starting and finishing the AMPARTLIST dialog. The user may use this to handle the modification of the data, which needs to be passed to the external database and must reflect the current state of the BOM data. Using onCanceled and onFinished users may abort or commit the transaction, which may be started during onStarted notification.

Balloon Dialog Operations

virtual void onBalloonDlgStarted(const AcDbObjectId& balloonId)

virtual void onBalloonDlgCanceled(const AcDbObjectId& balloonId)

virtual void onBalloonDlgFinished(const AcDbObjectId& balloonId)

These methods are called according the starting and finishing the AMBALLOON dialog. The user may use this to handle the modification of the data, which needs to be passed to the external database and must reflect the current state of the BOM data. Using onCanceled and onFinished users may abort or commit the transaction, which may be started during onStarted notification.

AcmBOMStd

Inherited from AcmSymbolStandard. This class defines the common interface for BOM standards. All of its virtual member functions need to be overloaded to get symbol-specific behavior. This class is not instantiable. It overrides all virtual functions defined at AcmSymbolStd. We'll list here only the additional interface defined just for BOM standard. Note that for this release, The use of equivalents has been replaced by the use of formulas. For example, if you have used AC_NOTE as equivalent to NOTE, this will be migrated to the default formula as '=<ac_note>'. And if you then ask for the value of the column NOTE, you'll get the same result as before. Use getItemData or getItemRawData.

Although isBomEquivalents is still in the API, it is obsolete.

The AcmSubSymbol class is discussed in the symbol-related classes.

virtual ~AcmBOMStd();

AcmBOMStd();

The constructor is a protected member function and so you cannot create instances of this class in the drawing. You must use one of the derived classes.

void setPartListServer(AcmCPartListStd* pStd);

void setBalloonServer(AcmCBalloonStd* pStd);

These two protected member functions are used to properly set up the internal BOM standard structure. In case you want to override the AcmBOMStd, you may want to change the default implementation of parts list standard as well. In this case you must call these methods in cInit() member function.

AcmCPartListStd* partListServer() const;

AcmCBalloonStd* balloonServer() const;

These methods are used to access parts-list specific and balloon-specific settings.

virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);

This is a protected member function that is used to properly synchronize the BOM standard if the standard changes units. The AcmBOMStd class will update the widths of the columns and forward this call to the parts list standard and the balloon standard.

Column Support

Acm::ErrorStatus appendColumn(AcmCColumnDef*& pColumn , Acm::ColType type,

Acm::DataType dataType, LPCTSTR colName,

LPCTSTR caption = NULL);

Creates a new column of the specified type, name, and caption and appends it to the end of the column list. If successful, the function returns the new column definition.

Acm::ErrorStatus insertColumn(int pos , AcmCColumnDef*& newColDef ,

Acm::ColType type, Acm::DataType dataType,

LPCTSTR colName, LPCTSTR caption = NULL);

Creates a new column of the specified type, name, and caption and inserts it into the specified position in the column list. If successful, the function returns the new column definition.

Acm::ErrorStatus deleteColumn(int pos );

Deletes the specified column of the specified position .

Adesk::Boolean moveColumn(int oldPos , int newPos );

Reorders the specified column from the oldPos position to the newPos position.

Adesk::UInt16 columnLength() const;

Returns the number of columns in the standard.

AcmCColumnDef* column(int pos);

const AcmCColumnDef* column(int pos) const;

Gets the column object in the specified position in the columns list.

AcmCColumnDef* column(LPCTSTR name, LPCTSTR caption=NULL);

const AcmCColumnDef* column(LPCTSTR name, LPCTSTR caption=NULL) const;

Gets the column object with the specified name or caption. If name is not null, the name is used to find the matching column. If name is null and caption is not null, than caption is used to find the column.

AcmCColumnDef* columnByIdx(Adesk::Int16 index );

const AcmCColumnDef* columnByIdx(Adesk::Int16 index ) const;

Gets the column using the persistent column index. Each column has this index, which is maintained by the application and which keeps its value, even if the column changes its position in the list. These indexes are used in parts lists or balloons to identify the column to be displayed.

AcmCColumnDef* columnByType(Acm::ColType type);

const AcmCColumnDef* columnByType(Acm::ColType type) const;

Gets the column by its type. Each column has its own unique type, based on the meaning of the column. If you want to get the column used for item number you can use Acm::kItem to get the column object no matter what the column name, caption, or index.

Printing Support

virtual Adesk::Boolean setPrnFactoryDefaults();

This method will reset all settings to the factory default setting. Users may preview this setting right after creating the new standard.

Acad::ErrorStatus getPrnPageProp(Adesk::Boolean& titleUsed,

CString& titleText,

Adesk::Boolean& centered) const;

Acad::ErrorStatus setPrnPageProp(Adesk::Boolean titleUsed,

LPCTSTR titleText,

Adesk::Boolean centered);

These functions get and set the page properties for printing.

Acad::ErrorStatus getPrnLines(Acm::LineTypes& border, Acm::LineTypes& title,

Acm::LineTypes& heading, Acm::LineTypes& item,

Acm::LineTypes& vertical) const;

Acad::ErrorStatus setPrnLines(Acm::LineTypes border, Acm::LineTypes title,

Acm::LineTypes heading, Acm::LineTypes item,

Acm::LineTypes vertical);

These functions get and set the type of lines used for printing graphics. There are several line types users can use - they differ in line weight.

Adesk::Boolean isPrnHeaderUsed() const;

void setPrnIsHeaderUsed(Adesk::Boolean isUsed);

Specifies whether to print heading or not. This setting may be different from those used for a parts list in a drawing.

Acad::ErrorStatus getPrnHeights(Adesk::Int16& title,

Adesk::Int16& heading,

Adesk::Int16& item) const;

Acad::ErrorStatus setPrnHeights(Adesk::Int16 title,

Adesk::Int16 heading,

Adesk::Int16 item);

These methods are used to set or get the height of the text in a different part of the printing table.

Acad::ErrorStatus getPrnTitleFont(CString& fntName,

Adesk::Int16& height, Adesk::Boolean& isBold, Adesk::Boolean& isItalic) const;

Acad::ErrorStatus setPrnTitleFont(LPCTSTR fntName,

Adesk::Int16 height, Adesk::Boolean isBold, Adesk::Boolean isItalic);

These functions get and set the font for printing the title of the BOM table.

Acad::ErrorStatus getPrnHeadingFont(CString& fntName,

Adesk::Int16& height, Adesk::Boolean& isBold, Adesk::Boolean& isItalic) const;

Acad::ErrorStatus setPrnHeadingFont(LPCTSTR fntName,

Adesk::Int16 height, Adesk::Boolean isBold, Adesk::Boolean isItalic);

These functions get and set the font for printing the heading of the BOM table.

Acad::ErrorStatus getPrnItemFont(CString& fntName,

Adesk::Int16& height, Adesk::Boolean& isBold, Adesk::Boolean& isItalic) const;

Acad::ErrorStatus setPrnItemFont(LPCTSTR fntName,

Adesk::Int16 height, Adesk::Boolean isBold, Adesk::Boolean isItalic);

These functions get and set the font for printing the item text in the BOM table.

Acad::ErrorStatus getPrnMargins(Adesk::Int32& bottom,

Adesk::Int32& left, Adesk::Int32& right, Adesk::Int32& top) const;

Acad::ErrorStatus setPrnMargins(Adesk::Int32 bottom,

Adesk::Int32 left, Adesk::Int32 right, Adesk::Int32 top);

AcmSymbolStd Interface

virtual Acm::ErrorStatus cInit();

Users may overload this method in their classes to initialize the BOM standard with their own parts list standard balloon standards.

virtual Adesk::Boolean setFactoryDefaults();

This member function will forward the call to the parts list standard and balloon standard objects, if they are defined.

virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;

virtual Adesk::Boolean getTreeItems(AcmCObjPtrArray<CSymStdTreeItemDesc>& descArray) const;

virtual Acm::ErrorStatus getDescription(CString& desc,

CBitmap*& pBmpLoaded, CBitmap*& pBmpReg, Adesk::Boolean& enablePref) const;

These member functions are implemented for the AcmSymbolStd interface. They are necessary to be able to properly edit the standard.

AcDbObject Interface

virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer);

virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const;

virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler* filer);

virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;

virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;

AcmCColumnDef

This is a virtual class. Users may get the pointers to these objects from the AcmBOMStd object.

virtual LPCTSTR name() const = 0;

virtual void setName(LPCTSTR str) = 0;

Sets or gets the name (or tag) of the column. Most of the column names are changeable by the user, but some (ITEM, QTY, NAME ) are static and cannot be changed.

virtual CString localName() const = 0;

Columns that do not allow their names to be changed will return local version of the column name. This string is usually displayed in a dialog, so that users will understand what these columns mean.

virtual LPCTSTR caption() const = 0;

virtual void setCaption(LPCTSTR caption) = 0;

Description of the column. It is used in the column heading in the parts list or BOM dialog.

virtual void createCaption(LPCTSTR translCaption) = 0;

This is support for online translation for column headings. If the input string can be translated, the translated string will become caption and generated format specification is stored for translation to another target language. See documentation of ACDAM PP Online Translation.

virtual Acm::ColType type() const = 0;

virtual void setType(Acm::ColType type) = 0;

Sets or gets the column's type. Each column has its own unique type, for example kItem, kQty, kDescription. User-defined columns may have kUser1, ., kUser8 or kUnknown. kUnknown is used if the number of user-defined columns exceeds 8.

virtual Acm::AlignmentType captionAlign() const = 0;

virtual void setCaptionAlign(Acm::AlignmentType type) = 0;

virtual Acm::AlignmentType dataAlign() const = 0;

virtual void setDataAlign(Acm::AlignmentType type) = 0;

Sets or gets the alignment for the data and for the caption. Both have the same meaning for drawings and dialogs.

virtual Adesk::Int16 index() const = 0;

Gets the column's persistent index.

virtual Acm::DataType dataType() const = 0;

virtual void setDataType(Acm::DataType type) = 0;

Gets or sets the column's data type. Column can have kGeneralText, kInteger, kDouble types.

virtual Adesk::Int16 precision() const = 0;

virtual void setPrecision(Adesk::Int16 val) = 0;

Determines the meaning for the column of the kDouble type, and also the precision used to display the data. For example, precision two means two digits after the decimal point.

virtual Adesk::Int16 size() const = 0;

virtual void setSize(Adesk::Int16 size) = 0;

The size of the buffer for the data. It has a meaning for the kGeneralText only. Other column types will use an appropriate value and the user cannot change it.

virtual double width() const = 0;

virtual void setWidth(double width) = 0;

Sets or gets the column width. If the column is that used in the parts list, we use this width to print the data.. This is the default value for each parts list. Users may override the general width for each parts list.

virtual bool isVisible() const = 0;

virtual void setVisible(bool visible) = 0;

Sets the visibility of the column in the BOM dialog. Even if the column is defined in the BOM settings, it may be set to be invisible if desired. In this case the query method will return false.

No change required for existing applications.

virtual bool isSummed() const = 0;

virtual void setIsSummed(bool isSummed) = 0;

Controls whether the column is being summed. Supported for numerical columns only. If the column is summed, then a bar showing the result of the sum will be displayed in the BOM dialog.

No change required for existing applications.

virtual LPCTSTR data() const = 0;

virtual void setData(LPCTSTR data) = 0;

Controls default data associated with the column. Such data can be constant, or in the form of an expression. If it is constant, then virtually any part's item will display this value in the BOM dialog. If you then query part data, this attribute will NOT be in the list. You will have to call getItemData and supply the standard ID, which contains the column, which defines this data.

If the default data is a formula, then it is also evaluated for each part. For example the column NAME has data '=PART:NAME'. This is evaluated as a part name if the part was created in MDT, but stays blank if the part was created as a partref entity.

No change required for existing applications.

virtual bool isLocked() const = 0;

virtual void setIsLocked(bool isLocked) = 0;

Controls whether the column is generally editable from the UI. If it is false, users cannot change the value in the BOM dialog (or parts list or balloon dialog). The default value for most columns is false (i.e. locked), except for the QTY column. No change required for existing applications.


Document Info


Accesari: 3375
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 )