TheSwamp
CAD Forums => Vertically Challenged => Land Lubber / Geographically Positioned => Topic started by: cyclops on March 28, 2017, 02:34:47 PM
-
I have a drawing with a civil 3d pipe network (structures & pipes),
I have a drawing with the cities asset numbers.
I need to add the asset number to the civil 3d pipe network structures & pipes.
How can I automate this process with very little user interaction, can a lisp routine let me select the asset number, then select the structure/pipe that needs the asset number.
The lisp routine would add the asset number to the structure/pipe "NAME" component.
Thanks for the help in advance.
Cyclops
-
...can a lisp routine let me select the asset number
Select it from what? Where will these asset numbers be?
-
rkmcswain,
The asset number is a piece of text in the drawing, they are also available as object data assigned to line work in the drawing.
Thanks,
CyclOps
-
In a most basic form, this will work.
(defun c:foo ()
(setq sel (entsel "\nSelect Text"))
(setq ent (entget (car sel)))
(setq str (cdr (assoc 1 ent)))
(setq sel (entsel "\nSelect Pipe/Structure"))
(setq ent (car sel))
(setq obj (vlax-ename->vla-object ent))
(vla-put-name obj str)
)
-
rkmcswain,
I'll try this.
Thanks!
CyclOps
-
I know this is late, but
If the city has this stuff in a GIS database,
then create your network from the database. Look at Import GIS data.
It should maintain the asset information.
-
The City had a database, it was not "compatible" with C3D pipes and the pipes were already in, when we found out that the city wanted the asset number added.
Thanks for the reply anyway.
Cycl0ps