View Full Version : 2012 Creating linetype/linestyle
Hi,
I need to create a line type to cater to the standards of a local government body, and would like to know how everyone else would do it.
I need a line that is 100 thick, 2m long then 4m space, and repeats, also can see in attached jpeg, the different line types that I want made.
I am usually on Microstation, and just start all over again with ACAD, so a bit lost as to how to do it within ACAD. I've been using microstation to create the linestyle and then export them in. :p
88563
Tom Beauford
2012-12-18, 12:21 PM
The thickness will come from lineweight. A,2,-4 for the definition calls for a line 2 in length and a space 4 in length. Asuming a value of 1 for LTSCALE and a value of 0 for PSLTSCALE. I believe Microstation scales linetypes with drawing scale? To do that in AutoCAD use a value of 1 for PSLTSCALE and 1 for MSLTSCALE. There will always be a line added to the start and end unless you use something like S,2,-4 If the total length isn't a multiple of 600 then it will be scaled to best fit. Expirement and see what works best for your needs.
If the lengths need to be exact then a lisp could be written to draw each stripe, but then they couldn't be modified very easilly.
irneb
2012-12-18, 01:23 PM
If only straight lines and only used in specific scenarios, then you might think of using a dynamic block using a 2dSolid which is arrayed depending on a length parameter (a bit easier to edit than doing so through lisp).
The problem with linetypes is that they adjust due to many factors, and some are overall factors while others are object specific / view specific. So you can't have a linetype which works in all scenarios conceivable - it would always be possible to cause hassles somewhere else. It depends on your situation.
As for thickness, that you can govern by changing the line into a polyline and giving it a width.
cadtag
2012-12-18, 01:37 PM
If a 3rd party application is an option, look at AutoLine, http://www.autodsys.com/autoline.html
They've been around for quite a while now, and are much more flexxible/capable than adesk's OOTB setup.
Tom Beauford
2012-12-18, 01:37 PM
Check out rrl.lsp at TEE SQUARE GRAPHICS' Free AutoLISP® Programs
http://www.turvill.com/t2/free_stuff/index.htm
It could be modified to do what you need.
Thanks everyone for the input and sharing. I will try the AutoLine first, it looks more straight forward. I dunno much about lisp - but i believe it's like a script that need written somewhere. I shall figure them sometime soon, hopefully I have time! :)
Once again, thank you~ and happy Holidays!
Hi,
I have tried using AutoLine, and managed to create the different linetypes successfully..
but I can't change existing line style to match the lines i just created, is this how it works?
Also I can't seemed to make the lines to work on an arc. Is there anything that I've done wrong?
I still dunno if I should use scale 1:1 or to use ltscale. I just irritate myself that I have to redraw the lines instead of just matching the line style to the ones that I just created.
And I am slow in learning the autolisp, I just cant seem to grasp the codes and stuff.. I dun even know where to throw this long codes into and how to get it to work on my ACAD software. Noone else seemed to know about it here in this coy, everyone seemed to cheat the drawings through by drawing polylines individually (like draw a line 2m long, then move it 2m away)..
*the slow learner :(
Also,
My Engineer opened the drawing and all the line styles I created and drew, it all either appeared messed up or doesnt appear at all.. Oh help me pls!
heinsite
2013-01-18, 05:54 AM
If only straight lines and only used in specific scenarios, then you might think of using a dynamic block using a 2dSolid which is arrayed depending on a length parameter (a bit easier to edit than doing so through lisp).
I do this exact thing to create various hold position lines (solid parallel to a dashed; double solids parallel to double dashed; etc) for airport linework, but I do not create the dynamic blocks using 2D solids. They use up too much memory. Instead use polylines with a width meeting the criteria.
Dave.
irneb
2013-01-18, 10:00 AM
I do this exact thing to create various hold position lines (solid parallel to a dashed; double solids parallel to double dashed; etc) for airport linework, but I do not create the dynamic blocks using 2D solids. They use up too much memory. Instead use polylines with a width meeting the criteria.
Dave.Do you mean your DB stretches the PL's? In which case I can't understand why you don't simply use PL's directly. And anyway - that won't work for the OP as his dash/gap lengths are also specified in real-world lengths, so they should not adjust according to the drawing's scale.
If you mean your PL is arrayed in the DB, then I can't see too much difference in RAM/file-size between that and a 2dSolid:
Command: (entget (car (entsel)))
Select object: ((-1 . <Entity name: 7ffff716ef0>) (0 . "LWPOLYLINE") (330 . <Entity name: 7ffff7039f0>) (5 . "39D7") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbPolyline") (90 . 2) (70 . 0) (43 . 200.0) (38 . 0.0) (39 . 0.0) (10 0.0 0.0) (40 . 200.0) (41 . 200.0) (42 . 0.0) (91 . 0) (10 1000.0 0.0) (40 . 200.0) (41 . 200.0) (42 . 0.0) (91 . 0) (210 0.0 0.0 1.0))
Command: (entget (car (entsel)))
Select object: ((-1 . <Entity name: 7ffff716f50>) (0 . "SOLID") (330 . <Entity name: 7ffff7039f0>) (5 . "39DD") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbTrace") (10 0.0 400.0 0.0) (11 0.0 600.0 0.0) (12 1000.0 400.0 0.0) (13 1000.0 600.0 0.0) (39 . 0.0) (210 0.0 0.0 1.0))
So it seems the solid is actually fractionally less data for the exact same visual effect. Though IMO they're very close to the same - sizewise.
But the reason I prefer solids is I can adjust the DB to have a width-parameter as well. So I don't need 100's of DB's because of such - only one with its width also adjustable. You can't do that if you use PL's. See attached.
heinsite
2013-01-21, 12:57 AM
I don't see the point in using solids in a 2D drawing... and in prior large base files in our organization that did use them I was able to show filesize savings when replaced with the attached polyline dynamic blocks. While your example may be correct my real world replacement was as well.
The attached examples use both wide polylines to comply with FAA widths, arrays to adapt to length requirements, and an alignment parameter. I should add also that these lines have standard widths and spacing requirements, so there is never a need to modify anything other than the length. These blocks have satisfied all my needs for some time.
Dave.
88851
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.