Author Topic: Civil 3D pipe network  (Read 148 times)

0 Members and 1 Guest are viewing this topic.

cyclops

  • Mosquito
  • Posts: 13
Civil 3D pipe network
« 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
It's 'O'Neill', with three L's!!!! (Jack O'Neill)

rkmcswain

  • Swamp Rat
  • Posts: 814
Re: Civil 3D pipe network
« Reply #1 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?

cyclops

  • Mosquito
  • Posts: 13
Re: Civil 3D pipe network
« Reply #2 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
It's 'O'Neill', with three L's!!!! (Jack O'Neill)

rkmcswain

  • Swamp Rat
  • Posts: 814
Re: Civil 3D pipe network
« Reply #3 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)
)



cyclops

  • Mosquito
  • Posts: 13
Re: Civil 3D pipe network
« Reply #4 on: March 28, 2017, 03:58:26 pm »
rkmcswain,
I'll try this.
Thanks!
CyclOps
It's 'O'Neill', with three L's!!!! (Jack O'Neill)