tpm_acopen

Land Desktop Development ARX CPP SDK

Up a level
tpm_acopen
 
 

Opens a topology.

ade_id

tpm_acopen(

char *toponame,

int write_access);

Returns the topology ID or ADE_NULLID.

toponame The name of the topology to open.
write_access Access status, either 1 (write) or 0 (read only). The default is 0.

The tpm_acopen function opens a topology and creates a new tpm_id that provides access to it.

If your application opens a topology with write access, your user is the only one who can edit this topology. No other user can even open it. If your application opens topology with read access, other users can open it also, but with read access only. To find out the access status of an already-open topology, use tpm_infostatus.

If you use tpm_acopen to test the status of a topology, always close the topology with tpm_acclose to ensure that you do not leave the topology open with multiple IDs pointing to it.

A topology loaded from a source drawing cannot be opened for write access. To find out if a topology was loaded from a current drawing, use tpm_infocurrent.

Important  You must store the topology ID when it is returned by tpm_acopen, and make sure that you do not lose it. If you do not have the ID of an open topology, you have no way to get it, and you cannot close the topology. Your alternatives are to quit AutoCAD Map or start a new drawing.