Print Page | Close Window

Create CAD blocks that work like Visio shapes

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=7059
Printed Date: 31.May.2026 at 18:15


Topic: Create CAD blocks that work like Visio shapes
Posted By: JWilson63
Subject: Create CAD blocks that work like Visio shapes
Date Posted: 21.Dec.2011 at 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




Replies:
Posted By: John Connor
Date Posted: 21.Dec.2011 at 18:01
Use a wipeout.

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: heinsite
Date Posted: 21.Dec.2011 at 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.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: John Connor
Date Posted: 22.Dec.2011 at 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?

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: heinsite
Date Posted: 22.Dec.2011 at 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


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: John Connor
Date Posted: 22.Dec.2011 at 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.


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: heinsite
Date Posted: 22.Dec.2011 at 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.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: heinsite
Date Posted: 23.Dec.2011 at 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.



-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: JWilson63
Date Posted: 23.Dec.2011 at 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 help

Happy Holidays!

Jack


Posted By: John Connor
Date Posted: 23.Dec.2011 at 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


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: heinsite
Date Posted: 23.Dec.2011 at 20:31
Originally posted by JWilson63 JWilson63 wrote:


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?
 
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.


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite


Posted By: heinsite
Date Posted: 23.Dec.2011 at 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. Embarrassed
 
Dave


-------------
Dave Hein, P.E.
Hawaii District Engineer
Kona International Airport
AutoCAD Certified Professional
Autodesk Expert Elite



Print Page | Close Window