TheSwamp

CAD Forums => CAD General => Topic started by: MSTG007 on December 03, 2020, 05:33:39 PM

Title: Linetype Understanding
Post by: MSTG007 on December 03, 2020, 05:33:39 PM
I am bashing my head, and cannot figure how to get this polyline to show correct spacing with the linetype.

Code: [Select]
*FP,FIRE  FP --------- FP ---------
A,.6,-.09,["FO",STANDARD,S=.06,U=0.0,X=-0.0825,Y=-.03],-.09

Can you elaborate why it is working like this and how to fix it lol.

Thank you!

Title: Re: Linetype Understanding
Post by: Jeff_M on December 03, 2020, 08:38:01 PM
Change the X value to -.045 (half the length of the space)
Title: Re: Linetype Understanding
Post by: MSTG007 on December 04, 2020, 07:34:55 AM
Thanks Jeff for the response... That worked great!

Im still drawing a blank on ones that contain single and triple values.

Code: [Select]

*ELEC,ELEC  --------- E ---------
A,.6,-.06,["E",Standard,S=.06,U=0,X=-0.045,Y=-0.03],-.06

*ETC,ETC --------- ETC ---------
A,.6,-.12,["ETC",Standard,S=.06,U=0,X=-0.065,Y=-0.03],-.12

Title: Re: Linetype Understanding
Post by: Jeff_M on December 04, 2020, 11:40:25 AM
You just need to adjust the X value based on the width of the characters being used. This can vary depending on the font in the style. This appears to work with Standard style using the txt.shx font.

*ELEC,ELEC  --------- E ---------
A,.6,-.06,["E",Standard,S=.06,U=0,X=-.02,Y=-0.03],-.06
*ETC,ETC --------- ETC ---------
A,.6,-.12,["ETC",Standard,S=.06,U=0,X=-0.08,Y=-0.03],-.12
Title: Re: Linetype Understanding
Post by: Jeff_M on December 04, 2020, 01:00:53 PM
The base insertion point for text in a linetype is the lower left corner. So the Y value of a 0.06 high character is -0.03 (as your definitions all show).To easily calculate the X value, create a Dtext of the desired text at the desired height, using a justification of MiddleCenter. Subtract the the 2 X values shown in the text object properties and use the negative value in the LT definition X value.
Title: Re: Linetype Understanding
Post by: MSTG007 on December 04, 2020, 04:03:43 PM
Thanks again Jeff! much Better!
Title: Re: Linetype Understanding
Post by: ronjonp on December 04, 2020, 05:00:18 PM
Also do a search for 'makelt' takes the guess work out of it  8-)
Title: Re: Linetype Understanding
Post by: MSTG007 on December 05, 2020, 02:45:23 PM
lol. I should have known to just look. lol Thanks again Ron! Nice Routine. handy;)
Title: Re: Linetype Understanding
Post by: ronjonp on December 07, 2020, 01:12:49 PM
lol. I should have known to just look. lol Thanks again Ron! Nice Routine. handy;)
Glad to help :)
http://www.theswamp.org/index.php?topic=47058.msg520876#msg520876
Title: Re: Linetype Understanding
Post by: MSTG007 on December 08, 2020, 07:15:12 AM
Your a MANIAC. Nice GUI. A lot easier. Again thank you for sharing that link. Helps ALOT!