tpm_editmodelem

AutoCAD Map 3D AutoLISP

Up a level
tpm_editmodelem
 
 

Modifies a topology element.

(tpm_editmodelem tpm_id elem_id new_val)

Returns T or nil.

tpm_id Topology ID (real)
elem_id Element ID (real)
new_val List consisting of a code for the property to modify and a new value for the property. See Properties and Values below.
Properties and Values
(10 . point) New coordinates of node or centroid (point)
(40 . f_res) Resistance of node (real), or forward resistance of link
(41 . r_res) Reverse resistance of link (real)
(70 . dir) Link direction (integer):
-1 Reverse
 0 Bidirectional
 1 Forward

The following example assigns new coordinates to the first node in a node topology.

(setq node_ss
   (ssget)) 
(setq var_id  (tpm_varalloc))
(setq result
   (tpm_mntbuild 
      var_id 
      "test" 
      "test descr" 
      1 
      node_ss)) 
(setq tpm_id
   (tpm_acopen "test" T))     ; open for write
(setq elem_id
   (tpm_elemid tpm_id 1 0))   ; gets first node
(setq result
   (tpm_editmodelem 
      tpm_id 
      elem_id 
      (cons 10 (list 1.0 1.0 0.0)) ) )