This directory contains the following samples:

- BomApi

- BOMWatcher

- Detail

- NewStd\

· Arrow

· MinimmDatum

· WeldServ

- PartList

- PartRef

- Standard

- SurfText

- Welding

- Edge

- Taper

- Note

- DetailSymbol

- TitleBorder

- ScaleArea

- RevisionList

- SectionLine

Samples description

A short description for the samples follows:

BomApi

This sample shows how the BOM can be created and its items added, removed or modified. It registers many commands, that show us the binding between partrefs and BOM table items (BomRows) and the differences among possible approaches to their accessing.

The available operations are:

CREATEBOMTABLE | - creates a BOM table, lets user to name it;
GETBOMTABLE | - prints all the items in BOM table;
CREATEITEM | - creates an item in BOM table and associates it with partref in drawing. The BOM table must exist, so a call to the CREATEBOMTABLE must be done first;
CREATEITEMU | - creates an item in BOM table that is NOT associated with any partref (BOM table must exist);
GETITEMREF, SETITEMREF, ERASEITEMREF | - manipulates the BOM table rows data, the row to which these changes applies is selected by clicking on appropriate partref;
FINDITEMNO, SETITEMNO, ERASEITEMNO | - like the three *ItemRef commands except you select item to work with by entering its number;
REMOVEREF, ADDREF | - removes and adds references between a partref and its associated item (i.e. BomRow) in BOM table, so that you can break off (and again re-establish) a connection between partref and BOM table;
GETPARTDATA, ALLPARTDATA, SETPARTDATA, CREATEPARTDATA | - works in a similar manner like the above getItemRef, ... methods except for that these commands can operate even over partrefs that are not connected to any item in BOM table. It also allows the user to set the number of items for the one selected reference;
ADDGRREP, REMOVEGRREP | - adding new and removing some of the graphical representations of the partref;
EXPORTBOM | - exports BOM table to a file of a specific format;
IMPORTBOM | - imports a file of a specific format into the BOM table;
SETPARTATTRIBUTE | - sets the value for a specified BOM attribute for the part reference;
SETITEMATTRIBUTE | - sets the value of a specified BOM attribute value for a BOM row item;
MERGEITEMS | - merges BOM row items with same attribute values;
GETITEMBALLOONS | - gets the list of balloons associated to the item (and references) in BOM row item;
GETITEMDEFINITION | - gets the part definition type of a specific BOM row item;
GETITEMEXTENDEDDATA | - gets the boolean value of the phantom state and exclude from part list state of the BOM items;
SETITEMEXTENDEDDATA | - sets the boolean value of the exclude from part list state of a specific bom item;

BOMWatcher

This sample shows how to use AcmBomReactor to get the notification about changes in BOM data, tables, entities, and dialog commands. You can use this application as skeleton for your own reactor work. Run BOMWATCH command to start this application.

Detail

This sample registers three commands: ADDDETAILSTD, EDITDETAILSTD and DETAIL.

ADDDETAILSTD | - adds support for detail symbol to current standard
EDITDETAILSTD | - allows to set some properties of detail symbol standard
DETAIL | - inserts an instance of the symbol to the drawing

NewStd\Arrow

Loading its arrow.arx into AutoCAD adds new symbol standard "TESTSTD" to the list of all available standards. This standard is, in fact, based on ISO standard except for adding one new arrowhead type (this is the arrow head that looks like a flat rectangle).

To see the changes, load arrow.arx, in AMSYMSTD command choose "TESTSTD" to be the current standard. Then add any symbol (for example amweldsym) and choose the arrowhead button to change arrowhead.

NewStd\MinimmDatum

Loading minDatum.arx into AutoCAD adds new revision called "Minimum Datum YEAR" to the ISO\DatumTarget standard. This example only shows how to add a revision to the list of symbol standards.

NewStd\WeldServ

Loading weldServ.arx into AutoCAD adds new "TESTWeld YEAR - YEAR" revision to the ISO\Welding standard.

This revision differs in three points from the standard ISO revision - the differences you can see by adding a welding symbol and using 'field symbol', 'supplementary symbol' and 'draw box around tail note' buttons (the third for a symbol without any text as note).

Appropriate classes for the implementation of these changes are TestFieldWeldEmpty, TestJGrooveWeld and TestAllAroundSquare class in WeldStd.h and .cpp files.

PartList

This sample registers two commands: CREATEPLIST and EDITPLIST.

CREATEPLIST | - adds partlist to a drawing. This command expects a BOM to be in current drawing. Prior to calling this command, user must run AMBOM to create a BOM table.
EDITPLIST | - removes inserted standard

PartRef

This sample registers a command CREATEPARTREF, which allows user to add (point) part reference to drawing and set its attributes.

Standard

This sample registers three commands: CREATESTD, REMOVESTD and RENAMESTD.

CREATESTD | - inserts selected standard from list of all available standards to the drawing
REMOVESTD | - removes inserted standard
RENAMESTD | - renames inserted standard

Surftext

This sample registers two commands: SURFTEXT, and SURFLIST.

SURFTEXT | - creates surface texture from specified symbol library or with predefined Ra values and add symbol library if it does not exist
SURFLIST | - lists the symbol data

Welding

This sample registers a command, WELDING, which allows user to add welding symbol to the drawing.

Edge

This sample registers two commands: CREATEEDGESYM and EDGESTD.

CREATEEDGESYM | - creates edge symbol and edits some of its properties
EDGESTD | - edits settings of edge standard element

Taper

This sample registers two commands: CREATETAPERSYM and TAPERSTD.

CREATETAPERSYM | - creates taper and slope symbol and edits some of its properties
TAPERSTD | - edits settings of taper and slope standard element

Note

This sample registers two commands: CREATENOTESYM and NOTESTD.

CREATENOTESYM | - creates note symbol and edits some of its properties
NOTESTD | - adds a new template and lists the names and values of all templates in note standard element

DetailSymbol

This sample registers three commands: CREATEDETAILSYM, MODIFYDETAILSYM and DETAILSYMSTD.

CREATEDETAILSYM | - creates detail symbol
MODIFYDETAILSYM | - modifies detail symbol and label
DETAILSYMSTD | - edits settings of detail standard element

TitleBorder

This sample registers four commands: CREATETITLE, MODIFYTITLE, DELETETITLE and TITLESTD.

CREATETITLE | - creates title border with drawing border set to "A (8.5x11.0inch)" and title block set to "ANSI Title Block A"
MODIFYTITLE | - modifies attributes, drawing border, title block and scale of the title border
DELETETITLE | - deletes selected title border
TITLESTD | - lists the paper formats, title blocks and revision set in drawing sheet standard element

ScaleArea

This sample registers two commands: CREATESCAREA and MODIFYSCAREA.

CREATESCAREA | - creates scale area and sets plot scale, rescales created objects and creates a viewport in “layout1” for the scale area.
MODIFYSCAREA | - modifies the plot scale of the selected scale area, rescales objects with the new plot scale and deletes the attached viewport.

RevisionList

This sample registers four commands: CREATEREVLIST, DELREVLIST, MODIFYREVLINE and ADDREVLINE.

CREATEREVLIST | - creates a revision line with number set to “1” and Name set to “Autodesk"
DELREVLIST | - deletes the first revision line
MODIFYREVLINE | - modify the first revision line to change the Name to “Your Name”
ADDREVLINE | - add a revision line with number set to the next integer value

SectionLine

This sample registers two commands: CREATESECTIONLINE and SECTIONSTD.

CREATESECTIONLINE | - creates a section line
SECTIONSTD | - set the section view symbol standard properties