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




Parts List

autocad en


Parts List

The parts list portion of the Standard Framework contains the AcmBOMStd and AcmCPartListStd classes for standard parts and the AcmPartList symbol. The symbol contains one sub-symbol - AcmCPartList. For description of AcmBOMStd see previous chapter. This symbol is dependent on the BOM table.

AcmCPartListStd

This class is responsible for parts list symbols. It contains no special services for the class, but it may contain some filters. The class has the following successors: AcmCPartListStdANSI, AcmCPartListStdBS, AcmCPartListStdDIN, AcmCPartListStdISO, and AcmCPartListStdJIS, which implement standard-specific variations.



This class is inherited from AcmSymbol. It overrides all overridden AcDbEntity functions, which is required. The class sub-symbol is AcmCPartList, which is inherited from AcmCSubSymbol.

AcmCPartListStd(AcmBOMStd *std);

virtual ~AcmCPartListStd();

AcmBOMStd* getBOMStandard() const;

Initialization, construction and access to the parent class.

void setColumnList(const AcDbIntArray& list);

void getColumnList(AcDbIntArray& list) const;

Sets or gets the list of currently displayed columns. The list contains the indexes, so that users should use columnByIdx of the AcmBOMStd to get real column objects.

Adesk::Boolean removeColumnByIdx(Adesk::Int16 idx);

This is the callback from the AcmBOMStd. It informs the parts list it is going to remov 15515r1724p e the column of this index. The part list standard should remove the index from its list.

AttachmentPoint attachPoint() const;

void setAttachPoint(AttachmentPoint aPoint);

Sets or gets the default attachment point for new parts lists. Possible values are kTopLeft, kBottomLeft, kBottomRight or kTopRight.

bool isHeadingEnabled() const;

void setIsHeadingEnabled(bool isUse);

Sets or gets the default value for the parts list heading. If the heading is not enabled, the title is disabled as well.

Several new methods have been introduced for this release. No change required for existing applications.

bool isGripFrameEnabled() const;

void setIsGripFrameEnabled(bool isUse);

Controls the default value for visibility of the grip frame. If user clicks on a parts list entity, four grips are highlighted. There may be lines visible that connect them to a frame. These methods control the visibility of those lines.

double dataTextHeight() const;

void setDataTextHeight(double height);

Controls the text size for data in a parts list independently of symbol text size.

AcDbObjectId textStyleId() const;

void setTextStyleId(AcDbObjectId& textId);

Controls the text style for data in a parts list independent of symbol text style.

Adesk::UInt16 dataTextColor() const;

void setDataTextColor(Adesk::UInt16 color);

Controls the text color for data in a parts list independent of symbol text color.

Standard Parts List Support

Below are the methods that have a meaning for standard parts list support but don't have a meaning for custom block support.

Acm::PartListMultipleRow multipleRow() const;

void setMultipleRow(Acm::PartListMultipleRow multiple);

Sets or gets the line spacing. Possible values are kSingle, kDouble or kTriple. Line spacing has a meaning for standard parts lists only. Custom clock based parts lists do not use this value.

Adesk::UInt16 headTextColor() const;

void setHeadTextColor(Adesk::UInt16 color);

double headTextHeight() const;

void setHeadTextHeight(double height);

double headingGap() const;

void setHeadingGap(double hGap);

Sets or gets the properties for the text used to display the heading and title. The title uses the same text properties as the heading, including the gap.

int title() const;

void setTitle(int isEnabled);

Sets or get the default value for displaying the title string in the parts list entity. The title can be switched off using this member function.

int overFlow() const;

void setOverFlow(int overflow);

Sets or gets the default value for the word wrap feature.

Adesk::UInt16 frameColor() const;

void setFrameColor(Adesk::UInt16 color);

Sets or gets the color for the frame. All other lines in the table use the symbol color.

double rowGap() const;

void setRowGap(double rGap);

Sets or gets the row gap. All lines in the table keep the same distance from the text.

double headingHeight() const;

Returns the recalculated height of the heading, including the gap. The recalculation is necessary for some fonts, because their actual heights might be bigger than the one from the style setting. For example, the string "q\\" may have a height of 4.5 even if the style setting is 3.0

double rowHeight() const;

Returns the recalculated height of one row, including gap and line spacing. The recalculation is necessary for some fonts, because their actual heights might be bigger than the one from the style setting. For example, the string "q\\" may have a height of 4.5 even if the style setting is 3.0.

This value is still only an approximation. If the actual item contains wrapped text, the real height may be bigger.

double realRowTextHeight() const;

Returns the recalculated height of one row. The recalculation is necessary for some fonts, because their actual heights might be bigger than the one from the style setting. For example, the string "q\\" may have a height of 4.5 even if the style setting is 3.0.

This value is still only an approximation. If the actual item contains wrapped text, the real height may be bigger.

void getSubEntsHeading(const AcmCPartList* pSymb,

AcmCAuxEntArray& subents) const;

void getSubEntsRow(const CStringArray& dataAr,

const AcmCPartList* pSymb,

Adesk::Boolean forData,

AcmCAuxEntArray& subents) const;

These two member functions are used for easier evaluation of the standard support. They are protected and may be used from inherited classes only.

double partListWidth() const;

Returns the default width of the parts list.

Custom Block Support

Below are the methods that have a meaning for custom block support and don't have a meaning for standard parts list support.

bool setCustomBlock(LPCTSTR name);

LPCTSTR customBlock() const;

Sets or gets the name of the scheme being used to display the parts list. For the scheme, there have to be at least two blocks (NAME0 and NAME1) at the time the scheme is being used. Up to 9 blocks can be defined. The first - NAME0 - block is used to display the heading, the others are used to display each item. The items can contain attributes that are filled with the appropriate value from the item and then displayed.

The scheme is just a default value. If the scheme is not found, the AcmCpartListStd is updated to use standard parts list support.

void setFilterEmpty(bool useFilter);

bool filterEmpty() const;

Sets or gets the switch that determines whether to display even blocks that don't contain any evaluated value.

bool isDSK() const;

void setDSK(bool use);

In case users have migrated the parts list and want to use an old DSK mask file to generate a parts list, they can switch this on. The evaluation may be slower this way.

Acad::ErrorStatus getBlocksIds(AcDbObjectIdArray& blocksIds) const;

Return a list of AcDbBlockTableRecords objects, which are used to display the part list

void getSubEntsBlock(const AcmCPartList*, AcmCAuxEntArray&) const;

This member function is protected. It is called from getSubEnts, in case the parts list is based on the custom block scheme.

General Interface

This class, although it is not directly derived from AcmSymbolStd, has a similar interface. Here are all known virtual member function, which you may know from AcmSymbolStd. They are called from the AcmBOMStd when it gets the specific call for the parts list support.

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

virtual void getSubEnts(const AcmCPartList* pSymb,

AcmCAuxEntArray& subents) const;

virtual void initToEdit();

virtual void initToEditOriginal();

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

virtual Acm::ErrorStatus cInit();

virtual Adesk::Boolean setFactoryDefaults();

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

virtual Acm::ErrorStatus checkVisibility(AcmCPartList* pData) const;

virtual Acm::ErrorStatus initFields(AcmCPartList* pData) const;

virtual Acm::ErrorStatus setSuggested(AcmCPartList* pData) const;

virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer, Adesk::UInt16 ver);

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

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

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

AcmCPartList

This sub-symbol doesn't have an extended interface implemented. It is inherited from AcmCSubSymbol.

Several new methods have been introduced in this release. No change required for existing applications.

virtual bool isGripFrameEnabled() const = 0;

virtual void setIsGripFrameEnabled(bool isUse) = 0;

Controls the visibility of the grip frame. See isGripFrameEnabled for details .

virtual bool isResultBarEnabled() const = 0;

virtual void setIsResultBarEnabled(bool isUse) = 0;

Controls the visibility of the result bar for the current parts list. If the parts list displays a summed column, the default value is ON. You can overload this function for each parts list. This is persistent data.

virtual bool isFormulaBarEnabled() const = 0;

virtual void setIsFormulaBarEnabled(bool isUse) = 0;

Controls the visibility of the formula bar for the parts list. This is persistent data.

virtual Acm::ErrorStatus getValue(LPCTSTR valueName, CString& value) const = 0;

virtual Acm::ErrorStatus setValue(LPCTSTR valueName, LPCTSTR value) = 0;

These methods can be used to access values from the result bar. However, if the column is summed, the value is read-only and you cannot change it. In this case an error status is returned. For example, you can call :SetValue("Note", "Total for this assembly :"); It will work, because NOTE is a text column and it cannot be summed. However, if you are calling :SetValue("MASS", "5.00"); you should change whether the MASS column isSummed() or not. If it is summed, the call will fail.

virtual AcDbObjectId bomId() const = 0;

virtual void setBomId(const AcDbObjectId& bomId) = 0;

Sets or gets the associated BOM Id.

virtual AcmCPartListStd::AttachmentPoint attachPoint() const = 0;

virtual void setAttachPoint(AcmCPartListStd::AttachmentPoint aPoint) = 0;

Sets or gets the attachment point type.

virtual bool isHeadingEnabled() const = 0;

virtual void setIsHeadingEnabled(bool isUse) = 0;

virtual int title() const = 0;

virtual void setTitle(const int title) = 0;

Sets or gets the setting for heading and title. If the heading is not enabled, the title is disabled as well.

virtual double width() const = 0;

virtual void setWidth(double width) = 0;

virtual double height() const = 0;

virtual void setHeight(double height) = 0;

Sets or gets the default parts list height and width. These values may be bigger than the geometric extents of the entity. If they are bigger, they define the direction of the parts list.

virtual Acm::ErrorStatus getItemList(AcDbObjectIdArray& items) const = 0;

Returns the evaluated item list. In this case the items are filtered using current filters.

virtual Acm::ErrorStatus setItemList(const AcDbObjectIdArray& items) = 0;

Sets the item list, which are displayed in parts list.

virtual Acm::ErrorStatus getViewId(AcDbObjectId& viewId) const = 0;

virtual Acm::ErrorStatus setViewId(const AcDbObjectId& viewId) = 0;

virtual void setColumnList(const AcDbIntArray& list) = 0;

virtual void getColumnList(AcDbIntArray& list) const = 0;

Gets and sets the list of columns. Used for changing order of the columns

Standard Support

virtual int overFlow() const = 0;

virtual void setOverFlow(const int overflow) = 0;

Sets or gets whether to use word wrap.

virtual Acm::PartListMultipleRow multipleRow() const = 0;

virtual void setMultipleRow(const Acm::PartListMultipleRow multiple) = 0;

Gets or sets the line spacing for the parts list.

virtual LPCTSTR titleText() const = 0;

virtual void setTitleText(const LPCTSTR titleText) = 0;

Sets or gets the title text - usually used as the parts list name.

virtual Adesk::Int32 minItem() const = 0;

virtual Acm::ErrorStatus setMinItem(const Adesk::Int32 min) = 0;

It will set or get the index of the first item, which should be included in parts list. In case the parts list contains Range filter, it will return eOk, otherwise it return eInvalidInput.

virtual Adesk::Int32 maxItem() const = 0;

virtual Acm::ErrorStatus setMaxItem(const Adesk::Int32 max) = 0;

It will set or get the index of the last item, which should be included in parts list. In case the parts list contains Range filter, it will return eOk, otherwise it return eInvalidInput.

Custom Block Interface

virtual bool setCustomBlock(LPCTSTR blName) = 0;

Sets the name of the scheme being used to display the parts list. For the scheme, there must be at least two blocks (NAME0 and NAME1) at the time the scheme is being used. Up to 9 blocks can be defined. The first - NAME0 - block is used to display the heading, and the others are used to display each item. The items can contain attributes which are filled with the appropriate value from the item and then displayed. If the scheme is not valid this function returns false and the status is not changed.

virtual bool getCustomBlockIds(AcDbObjectIdArray&) const = 0;

Return a list of AcDbBlockTableRecords objects, which are used to display the part list.

virtual LPCTSTR customBlock() const = 0;

Returns the name of the custom block scheme.

virtual void setFilterEmpty(bool useFilter) = 0;

virtual bool filterEmpty() const = 0;

Sets or gets the switch that determines whether to display blocks that don't contain any evaluated value.

virtual bool setDSKName(LPCTSTR blName) = 0;

virtual LPCTSTR dskName() const = 0;

Sets and gets the name of the DSK mask file, which may be used for evaluating. The file is saved as is - it is used without any changes. To enable the evaluation users must set the isDSK to true in the appropriate AcmCPartListStd.

Filter Interface

virtual Acad::ErrorStatus addFilter(AmdtItemFilter *, AcDbObjectId&) = 0;

If this function returns Acad::eOk, then the filter object was added to the database and closed. Its Id is returned in the AcDbObjectId parameter.

virtual bool getFilterIds(AcDbObjectIdArray&) const = 0;

Gets list of ids for the part list.

virtual Acad::ErrorStatus removeFilter(const AcDbObjectId&, bool erase = true) = 0;

Removes and/or erases a filter.

AmdtItemFilter

This object is inherited from AcDbObject and acts as the parts list filter. Its owner is always a parts list. It contains the standard AcDbObject interface - dwgInFields, dwgOutFields. This is the generic base class from which users may inherit to create new types of filters.

AmdtItemFilter();

~AmdtItemFilter();

virtual bool evaluate(const AcDbObjectId& itemId) const;

This function is used to evaluate the parts list using the specified filter. Each item is passed to the filter. If the filter returns false, the item is not displayed. This is the main responsibility of the filter and has to be overloaded.

virtual CString name() const ;

This function returns the name of the filter, which will be displayed in the parts list dialog box.

virtual Acad::ErrorStatus makeFilterReady();

This function is called to prepare a filter for use. Is called from AcmPartList::addFilter and when the partlist must be refreshed. There may be some internal filter settings.

virtual bool excluded() const;

Return if the filter is excluded from evaluation or not.

virtual bool isOn() const;

virtual void setIsOn(bool newStatus);

This function specifies whether the filter is activated.

AcDbObject Interface

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

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

virtual Acad::ErrorStatus subErase(Adesk::Boolean erasing);

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

Adesk::UInt16 classVersion() const;


Document Info


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