Proctor Posted October 28, 2009 Posted October 28, 2009 Hello: Our have this custom line type that is used and it draws the letters "LED" spaced evenly apart at 3 per ft; (every 4 inches). Today, I used the same line type to draw 2 different line lengths. the first was a length of 12 inches and therefore displays 3 LEDs. the second one is a length of 6 inches and so it displays 1 LED. My question is...I noticed that dependent on what length i draw the line, the word LED begins at a different distance from the start point. (see pic). I want to understand why it doesn't always start at the same distance no matter what length i draw. Here's the linetype code: *3 PER FOOT,3 PER FOOT A,0,-1.3,["LED",STANDARD,S=.4689,R=0.0,X=-.625,Y=-.2314],-2.7 From my understanding, this code means, put a space that's 1.3 distance, then write "LED", then put another space that's 2.7. Thank you for your help. Proctor Quote
eldon Posted October 29, 2009 Posted October 29, 2009 AutoCAD treats the line as a whole, and spaces out the inclusions in the linetype so that there is an equal spacing at each end. This means that it alters the length of the first and final segments to suit. This from the Help files:- Simple Linetypes [AutoCAD Customization Guide: ACG]With A-type alignment, AutoCAD guarantees that the endpoints of lines and arcs start and end with a dash. For example, suppose you create a linetype called CENTRAL that displays the repeating dash-dot sequence commonly used as a centerline. AutoCAD adjusts the dash-dot sequence on an individual line basis so that dashes and line endpoints coincide. The pattern fits the line so that at least half of the first dash specification begins and ends the line. If necessary, the first and last dashes are lengthened. If a line is too short to hold even one dash-dot sequence, AutoCAD draws a continuous line between the endpoints. For arcs, the pattern is also adjusted so that dashes are drawn at the endpoints. Circles do not have endpoints, but AutoCAD adjusts the dash-dot sequence to provide reasonable displays. The A-type alignment requires that the first dash length be 0 or greater (a dot or pen-down segment). The second dash length should be less than 0 (a pen-up segment). You must have at least two dash specifications for this alignment. Between the start and end dashes, the pattern dash specifications are drawn sequentially, beginning with the second dash specification and restarting the pattern with the first dash specification when required. If you want the letters to be at a fixed distance from the start of the line, you would be better to make a block of the letters, and use MEASURE. Quote
Proctor Posted October 29, 2009 Author Posted October 29, 2009 Hello Eldon: thank you for your reply and also for helping me to understand. My dilemma is this: My users use the custom line types to place the leds into their letters. I have created a utility that will then count the leds per letter for them. Sometimes when they place the line types, they overlap (see pic), and so my program has to determine if the the linetype belongs to that letter or not. In my pic you will see the letter E needs to get a count of 4 but it's picking up the one line type that overlaps into the E, but belongs to the T so it's getting a count of 5 instead. Currently, my code has a function to determine if the linetype belongs to the letter or not. it is working from the start param and then going a certain predetermined distance to where I believed (at the time) that the first LED placement occured; after which, it went another 4 inches in distance to where the next LED would occur and then sees if this point is inside the poly. if yes, I would count it for that letter. In short, i need to figure out where the first occurance of the word LED is for each linetype drawn. You said that the placement is based on an even distribution, so I'm wondering how I would be able to calculate this point. Thanks again for your help, Proctor Quote
eldon Posted October 29, 2009 Posted October 29, 2009 I have just done a little illustration using the AutoCAD linetype for a GAS supply. You can see that the lines are symmetrical about the mid point, but how the first and last line vary in length. Good luck with your project. Quote
Proctor Posted October 29, 2009 Author Posted October 29, 2009 that's a great visual - thanks for sending. I believe i can come up w/ some type of equation ....I'll work on it. thanks again for your help. Proctor Quote
Recommended Posts
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.