You are on page 1of 23

CAD-X Training

ArtiosCAD functionality
Opening Designs
Creating layers
Creating print items
Zoom functionality

Running Standards
Datacenter Database
Board Codes

Defaults
Outputs
3D VRML functionality

Opening Designs
short OpenDesign(string byVal designName, short byVal sync) Opens a design file or other
supported file types, will close any open files. Imported files will use the default tuning
entry for the type of file imported.
Parameters:
designName- name of the existing design workspace to open
sync- synchronization status
values: NOSYNC(0)|DESSYNC(1)|DBSYNC(2)|DIALOGSYNC(3)

Returns:
SUCCESS
NOTLICENSED
PROCESSINGERROR (error opening design file)
DESIGNNOTOPEN (design file does not exist)
WRONGDESIGNTYPE (design not single design nor manufacturing )
INVALIDDATA (invalid data for sync)

short OpenDesignWithTuning(string byVal designName, short byVal sync, string byVal


tuningFile) Opens a supported file types with a specified tuning entry
Parameters:
Same as OpenDesign()
tuningFile- name of a tuning file for the design to be opened

Returns:
Same as OpenDesign()
INVALIDDATA (invalid data for sync or tuningFile)

Description:

short CloseDesign() Closes current open design.


Parameters:
none

Returns:
SUCCESS
NOTLICENSED
DESIGNNOTOPEN(design was never opened)
PROCESSINGERROR

Opening Designs

Create a Simple Application in VB6 to

Open/Close a Design File.

Use NOSYNC/DIALOGSYNC

Open/Close an imported file type.

Plotting Design/Layer Control

short PlotDesign() Plots the currently open design including layers that are
turned on. Design is Scaled to Fit Active x Control window.

short SetOverlayClass(long byVal overlayID, short byVal enabled) Turns


on/off a class of ArtiosCAD layer. Classes being Dimension class/Overal
Dimensions

short SetOverlay(long type, long id, short enabled) Turns on/off a layer/print
item by the Layer/PrintItem id.

short GetNumOverlayItems(long itemType, long[out] numItems) Get the


total number of Layers/Print Items
long ReturnNumOverlayItems(long itemType) Get the total number of
Layers/Print Items

short GetOverlayItemName(long itemType, long itemId, string[out]


printitemName) Get the name (Description) of a Layer or Print Item.
long ReturnOverlayItemName(long itemType, long itemId)

Plotting Design/Layer Control

Add the ability to turn on/off layers in your Application.


Note: In the documentation Layer = Overlay.

Add the ability to turn on/off print items in your Application.


Add the ability to turn on/off a specific Layer in your Application
Add the ability to turn on/off a specific Print Item in your Application

Accessing Information
Getting General Information
short GetDesignType(long [out] designType) Gets the type of workspace (DESIGN, MFG)
BSTR ReturnDesignType()
short GetDesignName(string [out] designName) Gets the name of the currently open workspace.
BSTR ReturnDesignName()
short GetCadVersion(string [out] CadVersion) Gets the version of the latest ArtiosCAD currently installed.
BSTR ReturnCadVersion()
short GetWorkSpaceUnits(short [out] unit) Gets the Units of the currently open workspace (MM/INCH)
short ReturnWorkSpaceUnits()
short GetDesignRevision() Gets the revision number of the currently open workspace.
short GetGrainDirection() Gets the Grain/Flute Direction of the currently open workspace.
short GetPrintSide() Gets the Printed/Unprinted side of the currently open workspace.
short GetUnit() - Gets the units of the currently open workspace.

Accessing Information
Getting Calculated Information
Gets Numeric/Text data from a given code, code must match a code defined in ArtiosCAD defaults.
short GetNumericCode(string byVal codeName, double [out] codeValue)
short GetNumericCode4Param(string byVal codeName, double [out] codeValue
[optional] VARIANT p1, [optional] VARIANT p2,
[optional] VARIANT p3, [optional] VARIANT p4)
double ReturnNumericCode4Param(string byVal codeName,
[optional] VARIANT p1, [optional] VARIANT p2,
[optional] VARIANT p3, [optional] VARIANT p4)
short GetTextCode(string byVal codeName, string [out] codeValue)
short GetTextCode4Param(string byVal codeName, double [out] codeValue,
[optional] VARIANT p1, [optional] VARIANT p2,
[optional] VARIANT p3, [optional] VARIANT p4)
double ReturnTextCode4Param(string byVal codeName,
[optional] VARIANT p1, [optional] VARIANT p2,
[optional] VARIANT p3, [optional] VARIANT p4)

short SetCodeForPrintitem(long byVal printitemNumber, [defaultvalue(true)] boolean includeAll)


determines which printitems are used when accessing information from the workspace.
To switch between Manufacturing and Embedded Designs
short SetCodeForEmbDesign(long byVal designNumber, [defaultvalue(true)] boolean includeAll)
short SetCodeForManufacturing()

Accessing Information
Getting ArtiosCAD Variables.
Gets Numeric/Text variable data from existing ArtiosCAD variables.
short GetTextVariable(string byVal varName, string [out] value) Gets value of an existing text
variable.
BSTR ReturnTextVariable(string byVal varName)
short GetNumericVariable(string byVal varName, double [out] value) Gets value of an existing
numeric variable.
double ReturnNumericVariable(string byVal varName)

Accessing Information

Add the ability to Get basic information about your design.


Design Revision, Grain/flute direction and Print side.

Add the ability to get calculated information about your design.


Area with holes, Blank Size and cumes scoring.

Add the ability to get specific variables in your design.


L,W,D and CAL, IL, OG.

Running Standards
short SetStyleWorkspace(string byVal workspace) Sets the standard(style) to be run by
RunStandard
short RunStandard(short byVal useDialog) Runs a standard, creating a design using the
board code and variable information.
short RebuildDesign(short byVal useDialog) Reruns a standard to make changes in the
existing workspace.
short SetBoardByCode(string byVal boardCode) Set a board code by using the board code
from the CAD database.
short SetBoardByData(string byVal boardCode, string byVal boardDesc, double byVal
caliper, double byVal insideLoss, double byVal outsideGain, double byVal
roundingValue, string byVal flute, string byVal testCode, double byVal testValue, double
byVal basisWeight, double byVal basisCost) Set a board code by supplying data.
short SetNumericVariable(string byVal varName, double byVal value) Set an existing
numeric variables value.
short SetTextVariable(string byVal varName, string byVal value) Set an existing text
variables value.

Running Standards
Add the ability to run a standard using only CAD-X supplied dialogs.
Add the ability to run a standard using only CAD-X supplied dialogs for board codes
and variables.
Add the ability to run a standard using only data.
L,W,D and CAL, IL, OG.

Outputing/Exporting Designs

short OutputDesign(string byVal outputName, short byVal sampleType, string byVal


outputFile) Sends the open workspace to an output specified.

Outputing/Exporting Designs

Add the ability to output a design using a plot.


Add the ability to output a design using a report.
Add the ability to output a design using a sample output.
Add the ability to output a design using an export output.

Saving Designs
short SaveDesign(string byVal fileName, short byVal overWrite) saves the currently open
design.
short SaveAsRevision(string byVal authorization, string byVal description) saves the
currently open design as a new revision.
short SaveAsBitmap(short format, BSTR filename, short width, short height, [optional]
VARIANT border, [optional] VARIANT side,
[optional] VARIANT grain, [optional] VARIANT shrinkoption,
[optional] VARIANT quality) saves the design as a bitmap format.
Note: this can also be done through outputdesign
short SaveAs3DVRML(string [in] filename) saves the currently open design as a VRML
file. Needs fold angles

Saving Designs

Add the ability to save the design.


Add the ability to save the design as a new revision.
Add the ability to save the design as a bitmap.
Add the ability to save the design as a VRML file.

Using Tools
Tools
TOOL_NULL
TOOL_SELECT
TOOL_TEXTANNOTATION
TOOL_ARROWANNOTATION
TOOL_DISTANCEDIM
TOOL_ANGLEDIM
TOOL_RADIUSDIM
TOOL_ZOOMIN
TOOL_ZOOMOUT
TOOL_SCALETOFIT
TOOL_GRAPHIC
TOOL_SCALE
TOOL_DIFFSCALE
TOOL_ROTATER90
TOOL_GENROTATE

(1) - null state, no tool set, ie, mouse events are not interpreted
(2) - select tool text and arrow annotations, dimensions and graphics only
(3) - text annotation
(4) - arrow annotation
(5) - distance dimensiom
(6) - angle dimension
(7) - radius dimension
(8)
(9)
(10)
(11) - add a graphic image MS bmp, MS dib,tiff, jpeg, png, pdf
(12) - scale the selected item in all directions simultaneously
(13) - scale the selected item in all directions independently
(14)- rotate the selected item right 90
(15)- rotate the selected item about a fixed point

Tool Properties
ICadXTextAnnProp - text annotation
ICadXArrowAnnProp - arrow annotation
ICadXDimProp - distance, angle and radius dimension
ICadXGraphProp - graphics

Use StartTool() to begin using the tool

Using Tools
Add the ability to zoom in/out , zoom to fit in your application

Manufacturing Files
CadXLayout object
Use Layout() to create the new object.
Set Sheet size
Add Oneups to the layout
Nest Data

Manufacturing Files
Functions used with design/manufacturing files
OpenDesign() - needed to open a .mfg template
PlotDesign() - needed to show image in CAD-X window
GetGrainDirection() - can be used to set or get the grain/flute direction of the .mfg template
Set/GetPrintSide() - can be used to set or get the print side of the .mfg template
Set/GetUnit() - can be used to set or get the unit of the .mfg template
SaveDesign() - to save the complete output
ReturnErrorString() - to get text messages when errors occur
ReturnNumericCode4Param() - get numeric data from the workspace
ReturnTextCode4Param() - get text data from the workspace
SetCodeForManufacturing() - available numeric and text data refer to the manufacturing file
SetCodeForEmbDesign() - available numeric and text data refer to the specified embedded
design in the workspace
SetCodeForPrintitem() - available numeric and text data refer to the specified print item
SetOverlayClass() - to activate the overlays of the oneups on the sheet

Manufacturing Files

Add the ability to create a layout to your application.


Add the ability to get information from the oneup design as well as the
manufacturing file

Database Entities
ICadXDBEntity
Use DBEntity() to create.
Use to assign customer, owner information,
userfield, characteristics to the design database.
Replace the Database information window
programmatically.

Database Entities
Add the ability to assign a customer name to your application.
Add the ability to assign a value for a userfield to your application.

You might also like