Display full version of the post: Create CAD blocks that work like Visio shapes

JWilson63
21.12.2011, 16:36
We use Autocad exclusively and I've been building a library of blocks to use in our HVAC control drawings. What I'd like to do is to have a ductwork blocks that will "clip" what it's connected to the way similar "shapes" in visio work. ie: A perpendicular block will clip the line where it connects to a horizontal block.I tried creating a line segment to plot white which seemed the simplest approach but it will not "print" white and therefore defaults to black.These blocks are to be used by less experienced people so I'd like to avoid any kind of commands if possible


John Connor
21.12.2011, 18:01
Use a wipeout.


heinsite
21.12.2011, 23:10
I would suggest building a library of dynamic HVAC blocks with the properties you need.  "Clipping" can be done there with visibility states, but only for elements within the blocks themselves, not for objects you might be connecting them to.  So your block designs will need to consider your typical workflow.
 
Dave.

John Connor
22.12.2011, 01:23
Since the OP wants the simplest approach and states that the blocks are to be used by people with less experience than he has would a Dynamic Block still be a good solution?


heinsite
22.12.2011, 02:00
Unless I'm missing something a wipeout would require a separate step... and require its own training effort.  There's hardly any additional training required to go from inserting static blocks to dynamic ones, esp if the "clipping" part of the process can be accomplished as part of the insertion operation itself. 
 
We're getting to the point where the OP might want to attach an example of what he's trying to do.  I'm still kind of guessing at what the problem is since I'm not familiar with Visio shapes and how they're used in HVAC design.
 
Dave

John Connor
22.12.2011, 11:42

Well to me it sounds like the OP has HVAC symbols he wants to insert over lines.  He wants to somehow block those lines from showing.  The better approach would be to break the line upon insertion of the symbol which I believe can be done as part of the insertion process itself.  This means there would be no wipeout or dynamic block required.There is one other option and that would be to use a lisp routine that works in conjunction with the block insertion.  I'm not sure whether the OP or his co-workers would be agreeable to this approach.

John Connor2011-12-22 12:47:18

heinsite
22.12.2011, 21:37
My guess is the LISP idea would break the OP's training bank.  This  question reminds of something I've thought of before and that might be suitable for the AUGI wish list: Masks for Blocks.  If masking was available it would work for a problem like this one.
 
Short of an actual example from the OP I tend to agree that some of this might easily be solved with intellegent block design... dynamic or not.
 
Dave.

heinsite
23.12.2011, 01:43
After a bit of tinkering and looking around I may have found the solution... and it's not something new.  Others have struggled with this as well, and until we can directly mask blocks it's the best we'll have. 
 
The trick is to create the blocks with "masks".  Here's how:
 
1. Create the block and put a shape around it with or without buffer space depending on what your block will be doing;2. Hatch the shape with a solid hatch, color white with 0% screening;3. Put the shape and hatch below the block and any attribute objects;4. Plot a preview and see how it looks;5. As necessary tweak the CTB/STB file(s) used for printing to get suitable results.
 
It took me a bit of color tweaking... but it works.
 
Dave.

JWilson63
23.12.2011, 16:06

Gentlemen,Thanks for all  the responses:John: The wipe out works pretty well and you hit the nail on the head. If I insert a symbol or block I want to hide the underlying line. LISP may be a bit over my paygrade and I only have ACAD LT for my other guys. I think LISP support excluded from the LT version.Dave: These will be part of a dynamic block in some cases.I also like your idea as well and it's similar to my original approach which was to print "white" where I need to hide the under lying line. When I do this with my pen set as white and preview a plot to PDF, the white is always shown as black. I'm using the default CTB. Am I missing something?Thanks for the helpHappy Holidays!Jack
JWilson632011-12-23 16:08:27

John Connor
23.12.2011, 16:19
Jack: You are correct.  There is no support for lISP in AutoCAD LT.  Unless a diesel macro was available there is no programming solution to your problem and Dave's solution might be the best choice.Good luck.Merry Christmas Jack


heinsite
23.12.2011, 20:31
[QUOTE=JWilson63]

Dave: These will be part of a dynamic block in some cases.
I also like your idea as well and it's similar to my original approach which was to print "white" where I need to hide the under lying line. 
When I do this with my pen set as white and preview a plot to PDF, the white is always shown as black. I'm using the default CTB. Am I missing something?[/QUOTE]
 
First a couple of setup notes.  My Model space background is set to black... so is my Paperspace background.  So when this block is inserted both screens show a white "blob" around the the area that will eventually be masked out.  For my first test I printed to a DWF file to see what would happen.  Everything looked good.  From there I printed it to a PDF file, and again it all looked just right.  For my second test I printed it directly from AutoCAD to a PDF... and again it all looks okay.
 
I think the trick is in the CTB style setup.  You have to make sure that the mask hatch is solid and is drawn with a white (255) color.  You also have to make sure (and this tripped me the first time too) that the screening is set to 0 (zero).  If it isn't you'll likely get all black.
 
Now that I think of it you could probably use any color for the mask and as long as you set the screening to 0 you'd be okay.  I'll have to try that!
 
Merry Holidays, Everyone!
Dave.

heinsite
23.12.2011, 20:46
postscript:
 
I always draw my blocks on Layer 0 and leave the linetype color properties set to ByLayer.  As you know that allows a block to assume the color properties of the layer it's placed on.  But in this case - which might be the tripwire here - for the mask hatching I overrode the color in the block and used Color 255 (white).  And in the CTB setup I had to go to 255 and make sure the Screening was set at 0%.  That's when things worked.
 
Hopefully now the explanation is complete.
 
Dave