Jump to content

LISP for Customized Linetype that can be Offset


ROLANDO JR

Recommended Posts

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • ROLANDO JR

    10

  • ReMark

    6

  • MSasu

    3

  • BIGAL

    1

Top Posters In This Topic

Posted Images

Posted

You will need a linetype definition for that, not an AutoLISP tool. Will try to see if can design one for you.

Posted

CustomLinetype.PNG

Use the Make Shape and Make Linetype commands found in your Express Tools.

Posted

Thank you so much MSasu!

 

 

Hope you can help me on this.:-)

Posted

Thank you Remark!

 

 

I will try it.

Posted

By the way, here's what its look like.

 

 

Thank you!

User Input.jpg

Finished PLine.jpg

Customized linetype that can be offset.jpg

Posted

So you were successful is what you are saying?

Posted

No ReMark, I just show it to you so you will have an idea how you can help me.:-)

Posted

OK. I thought I gave you the answer back in post #3? Make a shape and then use the shape to make your custom linetype. Both commands can be found in Express Tools under the Tools category.

Posted (edited)

Recognize this drawing?

ShrubLineType.jpg

 

For your use...Shrubline Linetype.dwg

 

Saved in 2010 file format.

 

Have fun.

Edited by ReMark
Posted

I tried it already but it only works in a specific shape.

 

 

I'm doing a shrubs layout so outline shapes varies. I think what I need is to create a customized linetype first then LISP that can offset it. Thanks!

Posted

ROLANDO JR, please check this linetype definition; it require to have the Standard text style set to Arial (either adjust the definition):

*ROLANDOJRLINE, Rolando Jr linetype ___|\____|\____|\____|\___
A,.3,0,["|",STANDARD,s=.1,r=0,x=-0.02,y=0.03],-.1,["\",STANDARD,s=.15,r=25,x=-.04,y=-.015],0

Or, better, copy the definition from ReMark's example drawing after he will post the shape file along.

Posted

ReMark, I'm afraid that you missed to upload the Shrub.shx shape file. Can you fix that, please?

Although I'm not sure if OP will still be able to use your linetype definition since the shape file appear as saved with full path to your Desktop, so not sure how will behave on a different workstation.

Posted

You can make custom plines that represent any type of pattern they will have fixed rules regarding size etc but they are plines so can be trimmed and have thickness, they can be made of arcs as well as just lines, its a case of picking st end pts and have a loop defun to draw pattern bewteen these pts. I can not post example code as its copyrited, but happy to help someone who wants to have a go. I would start with the saw tooth pattern first its a bit easier than the arcs to do. Will see if have time.

 

a snipet

; routine to set N as number of pline segments as a factor of 90 mm.
; 90 mm 25 arc's with straights

; arcs only based on 90 mm high INSULATION

; lines only based on 90 mm high ACOUSTIC

; straight lines SMOKE

Posted

You can either make a custom linetype with text or with shapes.

 

Both have their drawbacks. If you use text, you have to make sure that the correct font is being used, because all fonts have different sizes.

 

If you use shapes, you have to send the shape file with the drawing file.

 

I personally prefer curved lines in a shrub line, and both these shrub lines have been posted on the forum in years gone by.

 

I still do not understand why you think you need a lisp to offset such a linetype :cry:

ShrubLines.JPG

Posted

I supposed to do a boundary first then offset it inside 100mm and matchprop it with the customized linetype that I am saying.

Posted

Uniform tin line?

 

The direction of the peaks is based upon which way the line is drawn. Draw a line left to right and the "peaks" point towards the top of your screen. Draw a line right to left and the "peaks" point towards the bottom of your screen.

Posted

Hi MSasu!

 

 

Thanks for your definition!

 

 

It almost works for me. But can you please help me revise it a bit more. I attached it for you.

 

 

Thanks!

SHRUBLINE.jpg

Posted

Sorry ReMark, its my fault. I supposed to reply to MSasu:-)

 

 

Anyway, can you please send the .lin & .shx that you created so I can check it also.

 

 

Thank you so much!

Posted

Since MSasu is assisting you then I'll defer to him since this isn't something I do often enough to be good at.

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