Finds an element within a topology.
(tpm_elemfind tpm_id type pattern)
Returns an element ID (real) or nil.
tpm_id | Topology ID (real) |
type | Type of element to find (int). Values: 1 Node 2 Link 3 Polygon |
pattern | Point or entity name. If pattern is a point, in which case type must be 1, the function returns the nearest point or link, or the enclosing polygon. If pattern is an entity name, in which case type can have any value, the function returns the corresponding object. |
The following example gets a point from the user and finds the nearest node in the topology named Parcel.
(setq pt (getpoint)) (setq topo_id (tpm_acopen "Parcel")) (setq node_id (tpm_elemfind topo_id 1 pt))
The result is a node ID, such as 4.71389e+007.