RENAMCOD_E

Replace one code with another on entities in the active drawing file inside enclosures of loaded topologies whose centroids have any selected code. Lines crossing an enclosure boundary can be clipped to it.

Parameters

Does not accept parameters.

Notes

The command works with topologies loaded using BINTOP. If none are loaded, it sounds an error tone, displays There is no topology file loaded, and ends.

Dialog box

Select the centroid codes dialog box

Running the command displays the Select the centroid codes dialog box:

Field Description Default value
Code list Centroid codes. Only enclosures whose centroids have any of these codes are processed Empty
Original code Code to replace. Supports wildcards (*, ?) Empty
New code Replacement code. A ? retains the character at that position in the original code, and a * retains the rest of the original code Empty
Clipping type Which entities are considered inside the enclosure. See Clipping types Interior

OK is only enabled when the list contains at least one code and Original code and New code are not empty. Clicking OK saves both codes and the clipping type in the CodA, CodB, and TipoInclusion values under the registry key HKEY_CURRENT_USER\Software\Digi21\Digi3D.NET\DigiNG\Extensiones\DigiNG.OrdenesTopologia\RenomcodR. The next time you run the command, the dialog box displays these values. Click Cancel to end the command without changes.

Entities processed

The command only processes entities in the active drawing file that:

  • Have the original code.
  • Are visible and within the area of interest.
  • Are neither arcs nor centroids of any loaded topology.

For each processed entity, the command replaces every code matching the original code and retains all other codes. The new code does not retain the original code's database link.

Enclosures and holes

The command iterates over enclosures in all loaded topologies and processes those whose centroids have any code in the list. An enclosure is clipped using its exterior boundary and its hole boundaries: what lies inside an island is outside the enclosure. If the island is itself an enclosure with one of those centroids, the command processes it as another enclosure. An entity lying exactly on the boundary is considered inside.

Clipping types

Type Lines Polygons and complex entities Points and texts
Interior Change the code on lines with all vertices inside. Lines crossing the boundary are unchanged Change the code on those completely inside Change the code if the insertion point is inside
Cut Clip lines crossing the boundary: inside portions receive the new code, and outside portions retain the original. Lines completely inside change code Unchanged Change the code if the insertion point is inside
Overlap Change the code on the entire line if at least one vertex is inside Change the code on any with at least one vertex inside Change the code if the insertion point is inside

Interior and Overlap decide by vertices: a line with all vertices inside the enclosure counts as interior even if one of its segments crosses an island.

End of the command

When finished, the command refreshes the view, sounds the end-of-command tone, and displays a message with the number of processed enclosures, entities whose codes changed as a whole, and clipped lines. If no enclosure has a centroid with any code in the list, it sounds an error tone, displays No enclosure of the loaded topologies has a centroid with any of the selected codes., and changes nothing.

The command does not unload the topology: arcs and centroids are unchanged.

UNDO undoes all changes from the command at once.

If Digi3D.AI rejects any new portions of lines clipped by an enclosure, those lines are preserved without clipping, and no portions are added. Other enclosures are processed normally. If it rejects an entity inside with the new code, its original is preserved.

Command characteristics

Command type Immediate command
Repeats automatically No
Menu option This command has no associated menu option
Toolbar This command has no associated toolbar button
Extension DigiNG.OrdenesTopologia.dll
Implementation Native
Related variables No related variables
Related commands BINTOP
DELETE_ENCLOSURE
CHNG_COD_E
RENAMCOD
RENAMCOD_SEL
UNDO
Internal name