CAD Forum ► EN ► CAD - general ► earthworks / batter tick routine (lisp?)
Display full version of the post: earthworks / batter tick routine (lisp?)
germanbarry
09.05.2011, 13:53
hi all
not sure if anyone here can help but i'm looking to save time on some earthworks drgs/xrefs by integrating a special lisp or linetype which will draw batter ticks for me. ideally it would be a lisp which did the following (or near enough):
- i type in a shortcut into the commandbar, eg BATTER
- i select the first polyline which would be the TOP of the batter slope
- i then select the second polyline which would be the BOTTOM of the batter slope
- potentially also have room for an entry to set the batter tick offsets (eg 5 metres apart) and perhaps also length of minor batter tick.
and then i watch CAD work its magic and see it fill in between the polylines with batter ticks (either with predefined tick-blocks or perhaps also as a linetype?). It should be able to work on lines which aren't necessarily parallel to eachother and also for curved lines. Ideally it would be autoscaled so that the short ticks remain the same size in proportion to the longer ticks.
not sure if i explained this one well enough but let me know if you have heard of anything like this before, or are a lisp-writing genius and want to burn some minutes.
Vladimir Michl
09.05.2011, 16:23
Try the SlopeTick utility on the Download page. We are open for suggestions how to improve it.
Also please note that AutoCAD Civil 3D includes this functionality, dynamically linked with the 3D model.
Seankeohane
13.05.2011, 15:54
Hi
Vladimir Michl,I tried to use this function and it didn't work.Command: slopetickSlope tickerSpecify the distance between slope ticks <168.3285>: Specify second point:Select the upper edge:Select the bottom edge:Flip ticks? [Yes/No] <No>: n; error: An error has occurred inside the *error* functionAutoCAD variable setting rejected: "osmode" nilI'm using AC 2008.RegardsSeank
Vladimir Michl
13.05.2011, 16:00
Sorry about that - there might be an error in SlopeTick but not the error you write about. We are not handling OSMODE in SlopeTick so it must be an error message from another utility you may have loaded with SlopeTick.
Try to use it in a clean AutoCAD session. We have tested versions 2012 down to 2009.
Seankeohane
13.05.2011, 16:24
Hi,thanks for quick reply. I tried again at a different AC 2008 pc. No joy.Selected lines disappear, with following message.thanks again, SeankCommand:SlopeTick command loaded. (C)2011, CAD Studio - www.cadstudio.cz_______ CAD, PLM, GIS/FM custom application development ________Command:Command: slopetickSlope tickerSpecify the distance between slope ticks <5>: Specify second point:Select the upper edge:Select the bottom edge:Flip ticks? [Yes/No] <No>:; error: bad argument value: AcDbCurve 2130314144
bigalfry
07.10.2011, 19:23
Hi Vladimir,I just recently found the slopetick lisp routine here and I love it. It can make my life so much easier. You said that you are open to suggestions and I have just a couple.It would be nice to be able to set the length of the short slope lines. Right now it draws them at half length but the standard for the company that I work for dictates they should be 1/3 length. It would be nice to have that as an option when using the routine.The other comment that I have is it would be nice to be able to choose which line the slope ticks are perpendicular to. Right now it always chooses the top of slope line and in some cases (like a cut situation) it just doesnt work because the lines should be perpendicular to the bottom of slope line.With those two changes that routine would be 100% perfect for my needs.If you can get those to work then that would be amazing!
Vladimir Michl
08.10.2011, 18:29
Hi baigalfry,
thanks for your input. Adding control for short-lines is quite simple. It is now included in the new version 1.4 available for download. But the perpendicularity would need a complete rewrite. Sorry.
You can setup the length with (on the command line or in your
ACADDOC.LSP):
(setq slopetickshort 0.333)
See:
http://www.cadforum.cz/cadforum_en/slope-hatches-batter-lines-in-autocad-tip7965
bigalfry
17.10.2011, 19:06
Thanks, Vladimir!That did the trick. This LISP routine is awesome.
bigalfry
27.10.2011, 00:04
I have one other question that maybe you can help me with. By default it puts the objects created on a layer called "SlopeTicks". is there any way that I can have it place the slope ticks on a layer of my choice? Maybe something I could just put in my ACADDOC.LSP file? It's not a big deal, if it can't be done then I can always use layermrg or rely on my standards check to notice the non-standard layer. I just thought that I would ask to see if I could remove one step from the process for myself.Thanks again