DataIO Object
Description
Generic object that handles input and output of formatted data. IDataObject-style functionality that's IDispatch-compatible and simplified.
Methods
GetInputFormats |
Obtains all the formats that can be accepted, paired with the storage-mediums on which they can possibly be received. |
GetOutputFormats |
Obtains all the formats that can be output, paired with the storage-mediums into which they can possibly be presented. |
ReadDataFromFile |
Reads in the specifically formatted contents of a file into the supporting object. |
ReadDataFromStream |
Reads in the specifically formatted contents of a Stream (IStream) into the supporting object. |
WriteDataToFile |
Writes out the contents of the supporting object in the specified format onto a file. |
WriteDataToStream |
Writes out the contents of the supporting object in the specified format onto a Stream (IStream). If once-dereferenced Stream pointer is NULL, then a Stream is allocated and must be 'Release-d()' by caller. |
Accessed From
AssemblyComponentDefinition.DataIO,
AttributeSet.DataIO,
AttributeSets.DataIO,
ComponentDefinition.DataIO,
DetailDrawingView.DataIO,
DrawingSketch.DataIO,
DrawingView.DataIO,
FlatPattern.DataIO,
PartComponentDefinition.DataIO,
PlanarSketch.DataIO,
PlanarSketchProxy.DataIO,
SectionDrawingView.DataIO,
Sheet.DataIO,
SheetMetalComponentDefinition.DataIO,
Sketch.DataIO,
SketchBlockDefinition.DataIO,
SketchBlockDefinitionProxy.DataIO,
SurfaceBody.DataIO,
SurfaceBodyProxy.DataIO,
VirtualComponentDefinition.DataIO,
WeldmentComponentDefinition.DataIO,
WeldsComponentDefinition.DataIO
Samples
Translate - Sheet Metal to DXF |
The sample code below writes a sheet metal file out as DXF. DWG is also supported. Use either the FLAT PATTERN DWG or FLAT PATTERN DXF formats.There are several optional arguments that can be specified as part of the format string. E.g. 'FLAT PATTERN DXF?TangentLayer=Tangents&SimplifySplines=True'). Below are the names of these arguments and relevant default values. The output will use these values unless you override them as part of the input string.
Argument | Type | Default Value | Note |
TangentLayer | String | IV_TANGENT | |
OuterProfileLayer | String | IV_OUTER_PROFILE | |
ArcCentersLayer | String | IV_ARC_CENTERS | |
InteriorProfilesLayer | String | IV_INTERIOR_PROFILES | |
BendLayer | String | IV_BEND | BendUpLayer + BendDownLayer (legacy support) |
BendUpLayer | String | IV_BEND | |
BendDownLayer | String | IV_BEND_DOWN | |
ToolCenterLayer | String | IV_TOOL_CENTER | ToolCenterUpLayer + ToolCenterDownLayer (legacy support) |
ToolCenterUpLayer | String | IV_TOOL_CENTER | |
ToolCenterDownLayer | String | IV_TOOL_CENTER_DOWN | |
FeatureProfilesLayer | String | IV_FEATURE_PROFILES | FeatureProfilesUpLayer + FeatureProfilesDownLayer (legacy support) |
FeatureProfilesUpLayer | String | IV_FEATURE_PROFILES | |
FeatureProfilesDownLayer | String | IV_FEATURE_PROFILES_DOWN | |
AltRepFrontLayer | String | IV_ALTREP_FRONT | |
AltRepBackLayer | String | IV_ALTREP_BACK | |
UnconsumedSketchesLayer | String | IV_UNCONSUMED_SKETCHES | |
UnconsumedSketchConstructionLayer | String | IV_UNCONSUMED_SKETCH_CONSTRUCTION | |
TangentRollLinesLayer | String | IV_ROLL_TANGENT | |
RollLinesLayer | String | IV_ROLL | |
***Color | String | | *** indicates name of layer from the argument column. RGB values separated by ;. Example: TangentLayerColor=255;0;0 |
***LineType | Long | | *** indicates name of layer from the argument column. Long value from LineTypeEnum. Example: TangentLayerLineType=37644 |
***LineWeight | Double | | *** indicates name of layer from the argument column. Value in centimeters. Example: TangentLayerLineWeight=.1016 |
CustomizeFilename | String | | |
AcadVersion | String | | 2018, 2013, 2010, 2007, 2004, 2000, or R12 (for DXF only) |
SimplifySplines | Boolean | True | Enable spline replacement(by linear segments or arcs). |
SplineTolerance | Double | 0.01 | Chord tolerance for spline replacement |
AdvancedLegacyExport | Boolean | True | |
MergeProfilesIntoPolyline | Boolean | False | Build a polyline of the exterior profiles |
RebaseGeometry | Boolean | False | Move geometry to 1st quadrant |
InvisibleLayers | String | | List of layer names to make invisible, separated by ; |
TrimCenterlinesAtContour | Boolean | False | Trim the centerlines at contour. |
SimplifyAsTangentArcs | Boolean | False | True: Replace splines by tangent arcs. False: Replace splines by line segments. The SimplifySplines should be specified to True otherwise this option is ignored. |
|
Version
Introduced in version 4