Jump to content

how do i centre my custom line type


Marcoe85

Recommended Posts

Hi

 

i've been creating some custom line types for use in drafting but am coming across and issue with how it positions itself

 

i'm using mkltype

creating the line i want for example

---UE---

 

however i'm finding when the line isnt a perfect multiple of the line type the text goes of centre

eg. --UE-----

 

where as it retains the correct length at the start and just adds more line onto the end not having reached the next instance of UE

 

is there a way to make it equal out the lines on both sides given that it isnt long enough to duplicate the text at all

any help would be greatly appreciated

Link to comment
Share on other sites

If you use the Gas linetype that comes with AutoCAD, it seems able to centre itself.

 

Perhaps it would be better to try and write your own linetype definition, rather than let a programme mkltype add its own take on matters!

Centered Linetype.PNG

Link to comment
Share on other sites

Or you could "borrow" AutoCAD's hot water linetype definition and substitute your "UE" for the "HW" and test it. If it looks good then you're all set.

 

This is what the hot water linetype definition file looks like.

 

A,.0001,-.1,[bAT,ltypeshp.shx,x=-.1,s=.1],-.2,[bAT,ltypeshp.shx,r=180,x=.1,s=.1],-.1

*HOT_WATER_SUPPLY,Hot water supply ---- HW ---- HW ---- HW ----

 

Change it to this...

 

A,.0001,-.1,[bAT,ltypeshp.shx,x=-.1,s=.1],-.2,[bAT,ltypeshp.shx,r=180,x=.1,s=.1],-.1

*UNDERGROUND_ELEC,Underground electric ---- UE ---- UE ---- UE ----

 

I admit to guessing what the letters "UE" stand for. Change it if required.

Link to comment
Share on other sites

however i'm finding when the line isnt a perfect multiple of the line type the text goes of centre

eg. --UE-----

 

where as it retains the correct length at the start and just adds more line onto the end not having reached the next instance of UE

 

is there a way to make it equal out the lines on both sides given that it isnt long enough to duplicate the text at all

any help would be greatly appreciated

 

 

No.

 

As a simple example, if you have a linetype definition that says draw a 1 unit dash and a 1 unit gap, and repeat, how do you want it to appear on a line that is 6.7 units long?

 

The A alignment code ensures that each interior dash and gap are exactly 1 unit long. The starting and ending segments are the ones who are modified (lengthened or shortened)

 

The S alignment code distributes the extra space among the dashes and gaps (with the unfortunate side effect of ending with a gap in this case)

 

*A-Align-Code, __ __ __ __ __ __ __ __ __
A,1.0,-1.0

*S-Align-Code, __ __ __ __ __ __ __ __ __
S,1.0,-1.0

 

attachment.php?attachmentid=56848&d=1454343860

 

Having TEXT in the linetype makes no difference here. The same rules apply. As you say, unless the entity "isn't a perfect multiple of the line type", then something has to be modified.

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...