PM_DUMP_SET

Syntax

int_val = PM_DUMP_SET( pathname, set, max_segs, max_d[,flags][,failure_rec][,solids_mask][,insulations_flag][,servicespaces_flag][,"tag1", "tag2".,..] );
Input arguments
string pathname The path for the generated ASCII file.
handle set The handle of the set of objects to include in the dump.
int max_segs Controls the accuracy of faceting in cases where that kind of conversion is required. 'max_segs' gives the max number of segments that will be used. There is a system-imposed limit of 72 which will be silently enforced in case there is an attempt to exceed it.
float max_d Controls geometric primitives being output as a set of faces in case that kind of conversion is required. 'max_d' gives the maximum difference between the surface and approximating face. This value may be exceeded if the number of segments would become too big.
Optional input arguments
int flags If argument is an integer, then flags for the dump. These are a combination of MMT_DUMP_FLAG_** codes.

handle

failure_rec

If argument is a tag record, it will receive a pair of "id" and "err" tags for each object for which export failed. The "id" tag contains the object COS OID string, and "err" contains a string with the reason for failure.

To get ID and error for object N, use DM_GET_TAGVAL(failure_rec, "id", N) and DM_GET_TAGVAL(failure_rec, "err", N).

string

solids_mask

If argument begins with string "SOLIDS=" then this argument lists types of primitives that are to be output as solids instead of face set.

The following primitive type names are in use: "cyl", "flg", "cone", "econe", "tor", "box", "sph", "dish", "sweep", "plate", "beam".

If this argument is not given then the default is "SOLIDS=cyl,cone,tor,box,sph".

If the list is replaced with word "all" then all primitives are output as solids.

Note also that these strings are taken literally ie. are case-sensitive.

The format of these output files is explained in Plant Modeller Administrator's Manual.

int insulations_flag If the argument is in format "INSULATIONS=1", also insulations are exported. This is exactly the same as passing MMT_DUMP_FLAG_ADD_INSULATIONS in the flags argument.
int servicespaces_flag If the argument is in format "SERVICE_SPACES=1", also service spaces are exported. This is exactly the same as passing MMT_DUMP_FLAG_ADD_SERVICE_SPACES in the flags argument. The order of insulations_flag and servicespaces_flag can be inverted.

string

tag1, tag2,...

Specify what additional object information should be output with the geometric models. See Plant Modeller Administrator's Manual for tag names that you can use to obtain desired object info.

Return Values

Success:
int 0 ASCII file successfully updated.
Failure:
int -1 Script interface error.

Description

This function dumps geometric models, with some optional object information, into an ASCII file from a given set of objects. The output file can then be further processed to import it into other CAD or visualization systems.