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

Script Help Building Hatch

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
twbrown025
805 Views, 4 Replies

Script Help Building Hatch

Hi all,

 

I am learning about using scripts for automating commands and I am trying to see if anyone has a method for adding hatches to buildings without all of the corners located. The steps to create this hatch would be:

1. Offset (offset building polyline 2 feet, user input for direction)

2. Change layer of offset (need it to be a layer that does not plot, in our case this would be a hatch_boundary layer)

3. Add perpendicular lines between the two polylines (still on the hatch_boundary layer)

4. Combine hatch_boundary lines to a polyline (3 lines)

5. Hatch the area between the building polyline and the newly created hatch_boundary polyline

I realize this would be a very complicated script but I was wondering if anyone has experience creating script and could make an attempt. Even if you only know how to do steps 1 to 2 please post how you would create that portion of the script (It is tough to find examples online).  Here is an example of the end product:building hatch.JPG

Good luck, hope someone can help!

Thank you

4 REPLIES 4
Message 2 of 5
AllenJessup
in reply to: twbrown025

Basically a Script is any command you can execute from the command line. I can't figure out how to do the offset without selecting the line then you get the distance and direction. I also don't know how you'd draw the closing lines without selecting the endpoints.  Also you'd either have to pick the resulting Polyline of within the area to Hatch.

So with so many picks and inputs. I don't see a Script saving much time.

Actually. Once you create the polyline. You can probably select it as the (L)ast entity created.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 3 of 5
CADvisers
in reply to: twbrown025

It really couldn't be done in a script.  It would have to be done with lisp.

 

I just modified and attached one of my lisp programs to do what you "almost" need.   It was mainly created for closed buildings, so you may need to trim hatch as needed.  But it should automatically offset to inside 2ft without picking inside of original.

 

Hope it helps.   I accept all Kudos as I'm not always active on the forum.  Just happened to see this one.

Jonathan Stewart
CADvisers
P.O. Box 7811
Lancaster, PA 17604
Ph. 717-468-3111


Message 4 of 5
twbrown025
in reply to: CADvisers

Hi there,

I have found a solution on another page from Mr. RonJonP. Check it out. It works like a charm, a HUGE time saver. Thank you all for the content up until now. I hope his lisp file helps save you all time as well!

https://www.theswamp.org/index.php?topic=52781.0 

Message 5 of 5
lynn_zhang
in reply to: twbrown025

Hello @twbrown025 

 

Glad to hear you found a way to solve the problem and thanks so much for sharing the solution! This will benefit other users in the community with the same issue.





Lynn Zhang
Community Manager


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

Post to forums  

Rail Community


 

Autodesk Design & Make Report