Overview | Statement List | Example


导出零件

Synopsis

CPATT/[UPDATE,]'filespec'[,CSYS,csys][,ORIGIN,point],obj list[,IFERR,label:]

Description

Creates or exports a new part file from a current part file copying the objects and using the file name you specify. The WCS in the new part is positioned according to the coordinate system supplied in csys and translated according to the new origin supplied in point.

CPATT accepts object occurrences and copies the object occurrence prototype. The copy of the prototype is transformed so that it has the same position and orientation as the occurrence that was selected. Additional transformations are then applied if the optional CSYS and ORIGIN minor words are specified.

NOTE: CPATT does not accept part occurrences. Passing a part occurrence returns an error code.

Parameters

Parameter

Description

UPDATE

Minor word which indicates that the current part being filed should update (overwrite) the file ('filespec') of the same name already in the directory. You must specify the UPDATE minor word if the filename already exists, otherwise an error occurs. If the file does not exist and you specify UPDATE an error does not occur.

'filespec'

The filespec is a string or string variable representing the name of the Unigraphics part file to create. You can specify a file name or the complete pathname of the file.

CSYS

Minor word which indicates a coordinate system object is to be specified.

csys

An existing coordinate system object which represents the orientation for the WCS in the new part. If no coordinate system is specified, the WCS of the source part is used.

ORIGIN

A minor word which indicates that an origin is to be specified.

point

An existing point which represents the origin of the WCS in the new part. If the minor word ORIGIN and a point are not specified, the origin of the WCS of the source part is used.

obj list

A list of previously defined objects to save to the newly created part file. The object list can consist of separate objects or an array.

IFERR,label:

Specifies a label to which the program jumps if an error occurs.


Copyright ©2015 胡君NX二次开发官网(www.UGapi.com) QQ:85585969 All Rights Reserved.