Jump to content

Edit the Fence line shape in file.lin


Recommended Posts

Fence line form as shown below with pillar distance @1.5, pillar size 0.2. Now I want to include the first point and corner point of the Pline as the pillar. Can it be adjusted in the .lin file? Thank you AC!

*FENCELINE3,Fenceline square ----[]-----[]----[]-----[]----[]---
A,0.65,-.1,[BOX,ltypeshp.shx,x=-.1,s=.1],-.1,0.65

image.thumb.png.6f451d6a24c946fd33101db8ac3d0c7a.png

Link to comment
Share on other sites

I am not quite sure why you have posted this topic in the AutoLISP, Visual LISP & DCL forum. Perhaps you should post it in the The CUI, Hatches, Linetypes, Scripts & Macros forum.

 

Anyway, I understand linetypes to give an indication of the feature involved, instead of an accurate depiction and placement of the individual elements. A linetype goes from pick point to pick point and the main line cannot be offset in the .lin file.

 

If you need the pillar to be placed accurately, I suggest you draw it and forget trying to make a linetype

  • Like 1
Link to comment
Share on other sites

This has been discussed many times and the way line types work they do not add end points. End distances can leave odd spacing, so you have a couple of choices, add a Box at ends or vertices pretty easy to do. Make a linetype lisp it asks for max min spacing so will draw a box at end points, with a box evenly spaced. Ps box is a block with wipeout.

  • Like 1
Link to comment
Share on other sites

Maybe try a dynamic block with array or just array.

 

I did a fence in AutoCAD Architecture tool set by modifying a stair railing, it was 3D, but the overhead shot was an accurate post placement shot.

 

Modifying the stair rail was pretty easy after some trial and error, I actually made various 3 board and 4 board fences until a decision was made on which to use.

  • Like 1
Link to comment
Share on other sites

On 7/12/2024 at 9:57 PM, limfx said:

Fence line form as shown below with pillar distance @1.5, pillar size 0.2. Now I want to include the first point and corner point of the Pline as the pillar. Can it be adjusted in the .lin file? Thank you AC!

*FENCELINE3,Fenceline square ----[]-----[]----[]-----[]----[]---
A,0.65,-.1,[BOX,ltypeshp.shx,x=-.1,s=.1],-.1,0.65

image.thumb.png.6f451d6a24c946fd33101db8ac3d0c7a.png

 

Several years ago, my boss insisted on doing this--putting a post at each end and corner of a fence. As the other responses indicate, there is no known mechanism for doing that automatically, short of writing some code, but that's not a linetype. I did a lot of research, but I wound up having to draw the fence and insert an array of post blocks... which meant redrawing the whole length of any segment that changed. Sorry. Hope you find a better solution.

  • Like 1
Link to comment
Share on other sites

Try adding this linetype definition: 

*FENCELINE4,Fenceline square []-----[]----[]-----[]----[]
S,.0001,[BOX,ltypeshp.shx,x=-.1,s=.1],-.1,0.65,-.1,[BOX,ltypeshp.shx,x=-.1,s=.1],.0001

In a linetype definition A keeps distances exact and adds line segments on the ends.

S doesn't add line segments at the ends, it adjusts the lengths of the line segments in between.

Make sure PLINEGEN (System Variable) is set to the default value of zero(0) so the endpoints will be at each vertex of the polyline.

 

Undocumented since AutoCAD version 9 but still works.

Edited by tombu
PLINEGEN (System Variable)
  • Like 1
Link to comment
Share on other sites

5 hours ago, tombu said:

Undocumented since AutoCAD version 9 but still works.

 

I always wondered why they never bothered to use anything but A.

 

This is like finding the Holy Grail!! Well, not that awesome, but wow!

 

<makes note in Buried Features of AutoCAD>

  • Like 1
Link to comment
Share on other sites

Linetype definitions haven't changed since Complex ones were introduced in r13 before Mtext was around. Features like Mtext has like referencing fonts instead of Text Styles and Background mask for the text have been needed for a long time.

I submitted it as a Wish List item on AUGI in 2011: https://forums.augi.com/showthread.php?133959-Font-referencing-Background-Masking-in-Complex-Linetypes

1. I'd like see features like Mtext has like referencing fonts instead of Text Styles and Background mask for the text. Then I could call out a font instead of having to create a Text Style using the font just to reference a character. A and S are still the only alignment codes and only A which guarantees the ends always start and end with a dash is documented. Perhaps the more current type formating could be used with a new alignment code.

2. The ability to set the text angle without being able to center justify it has always been useless.

3. More shapes in the standard ltypeshp.shp including arcs of 30°, 45°, 60°, & 90° so we wouldn't have to create and keep track of custom shape files for most linetypes.

4. Incorporate multiline functionally into complex linetypes, multilines were poorly thought out.

 

I did have one of my wishes granted "Strike-through formatting in MText objects": https://forums.augi.com/showthread.php?119676-Strike-through-formatting-in-MText-objects

 

You should create a page for "Buried Features of AutoCAD" with a link for users to submit ones they've found!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...