AutoCAD Plant 3D Forum
Welcome to Autodesk’s AutoCAD Plant 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Plant 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Valves on wrong layer

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
Attila.Vallyon
2599 Views, 15 Replies

Valves on wrong layer

Hello!

Sometimes the valves go on wrong layer. Even if I change the layer of the valve after I isolate that layer the valve disappears. If it would be on different layer. I have to use BEDIT command to edit the valve block, delete the 3D model an replace a new one with 0 layer.

The 3D solid of a valve has to be on 0 layer within the block. But the P3D assign different layer within the block to that 3D solid.

Is it a bug?

Can it be fixed?

Regards,

Regards,
Attila Vallyon
15 REPLIES 15
Message 2 of 16
dave.wolfe
in reply to: Attila.Vallyon

You can access layer settings for Plant 3D by going to PROJECTSETUP, Plant 3D DWG Settings > Layer and Color Settings.

 

Have you set up your layers like you want them to be through this dialog?

Dave Wolfe
Isaiah 57:15



Tips and Tricks on our blog: ASTI blog
EXPERT ELITE MEMBER
Plant 3D Wish list
Message 3 of 16
Attila.Vallyon
in reply to: dave.wolfe

Actually I turned off this feature a long time ago.

I made those custom made valves with custom geometry. Maybe the problem was with the 3D solids. I changed all line properties of the solid (color, linetype, lineweight, material) to ByBlock. Hopefully I won't have this kind of problem anymore.

Regards,
Attila Vallyon
Message 4 of 16

We have the same problem. From my experiences in AutoCAD I think that is something with block creation, In catalog with valves.

 

In our project, problem is with check valves.

 

I have idea that We must change block with this type of valve directly in folder with block for Plant ...

 

I must test...

 

Srdjan.

 

P.S. idea with layer codification is good, but it seam that doesn't work with some type of valves.

Message 5 of 16

Yes, the problem with the valves only. The fittings and tubes are OK.

I realised that the P3d assigns the pipeline layer within the 3D block to the 3D solid when I insert a new valve. But if I insert the same type and size valve on a different line the layer of the valve solid within the block remains the same. That is the problem.

Maybe if I insert a valve on the 0 layer the P3d won't assign different layer.

I will try.

Regards,
Attila Vallyon
Message 6 of 16

In the meantime I found a solution.

Be on the "0" layer always when routing a pipe or inserting a valve block. The software will change the layer automatically according to the line number.

And when create a new inline element in the cataloge based on custom dwg geometry  set everything to "By block".

Regards,
Attila Vallyon
Message 7 of 16

Found the solution:

 

All custom block components MUST be color "Byblock", layer 0. Once you create the block, the block MUST be color "ByLayer", layer 0. Then you plantpartconvert them and then it the parts will change color with the layers.

 

The cause of this problem is that Plant3d, in reality, is just Autocad with a bunch of Blocks kept in a database. When you insert a custom valve, it re-"blocks" your custom block and will associate a color with the current layer. The plantpart thus becomes a deeplly nested block with the current layer/color and now you can't change the color of the block without a bunch of complicated bedits. 

 

Now, if your catalog is like mine and full of literally hundreds of custom blocks, its prohibitively time consuming to go back and bedit all your old blocks and re-input them into your plant database.

 

Instead, I was able to find a lisp routine, "fixblock.lsp" that will fix all your custom parts without breaking the plant intelligence. All you need to do is run the lisp, select all the blocks in the drawing (or at least all the parts you want fixed), and then do a "regenall" and BAM everything will show up with the correct color/layer association.

 

I'm not sure if you had already come up with the solution yet, but I wanted to post this in case anyone had this problem still.

 

cheers,

 

viet

 

P.S. I'm such a luddite with computer stuff sometimes. I don't know how to attach a file but here is the lisp routine I was referring to. its an oldie but a goodie:

 

 ;FixBlock.lsp  [June 30, 1998]
 ;
 ; Copyright 1996 - 1998 ManuSoft
 ;
 ; Freeware from:
 ;   ManuSoft
 ;   http://www.manusoft.com
 ;
 ; Load function, then enter FIXBLOCK to redefine selected blocks
 ;  so that all entities are on layer '0', color 'BYBLOCK'.
 ;


(defun C:FixBlock (/ ss cnt idx blkname donelist Grp Update)
  (defun Grp (gc el) (cdr (assoc gc el)))
  (defun Update (bname / ename elist)
    (setq ename (tblobjname "BLOCK" bname))
    (if
      (and ename (zerop (logand 52 (Grp 70 (entget ename '("*"))))))
      (progn
        (while ename
          (setq elist (entget ename '("*"))
                elist (subst '(8 . "0") (assoc 8 elist) elist)
                elist (if (assoc 62 elist)
                        (subst '(62 . 0) (assoc 62 elist) elist)
                        (append elist '((62 . 0)))))
          (entmake elist)
          (setq ename (entnext ename)))
        (if (/= "ENDBLK" (Grp 0 elist))
          (entmake '((0 . "ENDBLK") (8 . "0") (62 . 0))))
        'T))
  )
  (if (> (logand (Grp 70 (tblsearch "layer" "0")) 1) 0)
    (princ "\nLayer 0 must be thawed before running FIXBLOCK!\n")
    (progn
      (if
        (progn
          (princ "\nPress <Enter> to fix all defined blocks\n")
          (setq cnt 0
                ss (ssget '((0 . "INSERT")))))
        (progn
          (setq idx (sslength ss))
          (while (>= (setq idx (1- idx)) 0)
            (if (not (member (setq blkname (Grp 2 (entget (ssname ss idx)))) donelist))
              (progn
                (if (Update blkname) (setq cnt (1+ cnt)))
                (setq donelist (cons blkname donelist))))))
        (while (setq blkname (Grp 2 (tblnext "BLOCK" (not blkname))))
          (if (Update blkname) (setq cnt (1+ cnt)))))
      (princ (strcat "\n" (itoa cnt) " block" (if (= cnt 1) "" "s") " redefined\n"))))
  (princ)
)
;End-of-file

Message 8 of 16

Thanks very much!

I will try!

Regards,
Attila Vallyon
Message 9 of 16

Only one problem. When I want to save on a model after using Fixblock I have a severe system freezup. I have to reset my computer after this.

Regards,
Attila Vallyon
Message 10 of 16

Hrm, i haven't really run across that problem yet. How big are your files? can you fixblock and save incrementally? Perhaps a purge then an audit might help before you try to save.

 

Message 11 of 16

I found the problem.

I ran the fixblock from the server drive, and I could open read only. I copied the lsp on my local drive than it worked.

Regards,
Attila Vallyon
Message 12 of 16

Hello!) I've found your nice answer:

 

 

Found the solution:

All custom block components MUST be color "Byblock", layer 0. Once you create the block, the block MUST be color "ByLayer", layer 0. Then you plantpartconvert them and then it the parts will change color with the layers. 

 

 coud you help me?:)

 

I just want to make new correct component. I make block of 3d solid, and block was on layer 0 and color by layer, and when we open block all components of block color "By block", layer 0. Exactly as you describe!) BUT! Then I inseret component in project, and for example we have 2 layers: layer -1 - red color, layer-2 - blue color. If at first inseret component in layer - 1 , component on layer-1, red color - good!, and then we inseret this component on layer - 2, components on layer - 2 and has blue color BUT!!!!!! If I turn off layer - 1, this components hide on layer -2!!!!!!! It seems like: color of components - correct, but layer wrong!!!  Please help to find were I was wrong!!!)))) I use PLANT 3D 2013. I will be happy to get any advice!!!)))) 

Message 13 of 16

, was your part completely scrubbed and purged? I usually have my parts saved to their own DWG, and completely purged and scrubbed, completely devoid of any blocks before I begin my block command.

 

If you have an example of a part, perhaps you can upload it or send it so I can see?

 

thanks,

 

viet

 

Message 14 of 16

I've started preparing model, just drawing 3d solid - box, and than make it component of plant 3d. And put it in component category - elblow, and everything was good!!!!) But than I put my model in component category - valve body - it dosn't work everything was like later) I attached my model, and what do you think if I all my components put in catregory elblow, in the future can I match my components with P&ID? I'm not try to work with matching P&ID and PLANT 3D yet)   I use plant 3d 2013.

Message 15 of 16

You have to be on the "0" layer when you insert a valve class component. For the fittings it does not matter. And also if you dont have a defined line tag in the model yet, just put the component in the "Unassigned" tag. Than the component remains on the "0" layer.

Once you make a line tag, the software put the component on the line tag layer automatically, but you have to be on the "0" layer.

Regards,
Attila Vallyon
Message 16 of 16

OK, thank you very much!) I've found solution - just let plant 3d automaticly assign layer and color, and I keep stay on layer 0)))!!!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost