PM_DUMP_3DC_SET

Syntax

int_val = PM_DUMP_3DC_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 3DC 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 maximum 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 The set of objects for the dump.

string

solids_mask

If argument begins with string "SOLIDS=", this argument lists the 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, the default is "SOLIDS=cyl,cone,tor,box,sph".

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

Note also that these strings are case-sensitive.

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

int

insulations_flag

If argument is a tag record, it will receive a pair of "id" and "err" tags for each object for which the export failed. The "id" tag contains the COS object 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)

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 tag_list 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 3DC file successfully generated.
Failure:
int -1 Script interface error.

Description

This function generates a 3DC file. It dumps the geometric model and possibly some optional information for the objects in the set in ASCII format.

At the highest level, this file contains three types of objects:

  • component templates
  • component instantiations (pumps, standard parts…)
  • inline components (steels, air ducts, piping parts)

Component instantiations and inline components may have optional information as requested by the caller.