TheSwamp

CAD Forums => Vertically Challenged => Land Lubber / Geographically Positioned => Topic started by: cyclops on March 28, 2017, 02:34:47 PM

Title: Civil 3D pipe network
Post 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
Title: Re: Civil 3D pipe network
Post by: rkmcswain on March 28, 2017, 03:40:30 PM
...can a lisp routine let me select the asset number

Select it from what? Where will these asset numbers be?
Title: Re: Civil 3D pipe network
Post by: cyclops on March 28, 2017, 03:46:26 PM
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
Title: Re: Civil 3D pipe network
Post by: rkmcswain on March 28, 2017, 03:55:07 PM
In a most basic form, this will work.


Code: [Select]



(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)
)


Title: Re: Civil 3D pipe network
Post by: cyclops on March 28, 2017, 03:58:26 PM
rkmcswain,
I'll try this.
Thanks!
CyclOps
Title: Re: Civil 3D pipe network
Post by: mjfarrell on August 28, 2017, 09:42:35 AM
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.
Title: Re: Civil 3D pipe network
Post by: cyclops on August 28, 2017, 10:06:41 AM
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