Samples Readme

This directory contains the following samples:

 

Samples description

A short description for the samples is given.

 

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;

 

Return to Top

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.

Return to Top

 

Detail

This sample registers the following commands:

 

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

 

Return to Top

 

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.

Return to Top

 

PartList

This sample registers the following commands:

 

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

 

Return to Top

 

PartRef

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

Return to Top

 

Standard

This sample registers the following commands:

 

CREATESTD

-     inserts selected standard from list of all available standards to the drawing

 

REMOVESTD

-     removes inserted standard

 

RENAMESTD

-     renames inserted standard

 

Return to Top

 

Surftext

This sample registers the following commands:

 

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

 

Return to Top

 

Welding

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

Return to Top

 

Edge

This sample registers the following commands:

 

CREATEEDGESYM

-     creates edge symbol and edits some of its properties

 

EDGESTD

-     edits settings of edge standard element

 

Return to Top

 

Taper

This sample registers the following commands:

 

CREATETAPERSYM

-     creates taper and slope symbol and edits some of its properties

 

TAPERSTD

-     edits settings of taper and slope standard element

 

Return to Top

 

Note

This sample registers the following commands:

 

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

 

Return to Top

 

DetailSymbol

This sample registers the following commands:

 

CREATEDETAILSYM

-     creates detail symbol

 

MODIFYDETAILSYM

-     modifies detail symbol and label

 

DETAILSYMSTD

-     edits settings of detail standard element

 

Return to Top

 

TitleBorder

This sample registers the following commands:

 

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

 

Return to Top

 

ScaleArea

This sample registers the following commands:

 

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.

 

Return to Top

 

RevisionList

This sample registers the following commands:

 

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

 

Return to Top

 

SectionLine

This sample registers the following commands:

 

CREATESECTIONLINE

-     creates a section line

 

SECTIONSTD

-     set the section view symbol standard properties

 

Return to Top

 

DatumTarget

This sample registers the following commands:

 

CREATEDATUMNOTGT

-     creates a datum target symbol

 

CREATEDATUMLINETGT

-     creates a datum target symbol with a line termination

 

CREATEDATUMPOINTTGT

-     creates a datum target symbol with a point termination

 

CREATEDATUMRECTTGT

-     creates a datum target symbol with a rectangular termination

 

CREATEDATUMCIRCTGT

-     creates a datum target symbol with a circular termination

 

CREATEDATUMATTATGT

-     creates a datum target symbol attached to another datum target

 

Return to Top

 

Structure

This sample registers the following commands:

 

STRUCTCOMP

-     creates component and component views in mechanical structure

 

STRUCTFOLDER

-     creates folders in mechanical structure

 

Return to Top