Jump to content

Lisp that trims a line when inserting a block from tool palette


Recommended Posts

Posted

Hi everybody, I am a CAD drafter with a need of having a LSP that breaks a polyline when inserting a Block. The goal is, having a polyline (e.g.: a pipe routing) and adding the block, that it cuts the polyline in the intersection point and deletes the part of line covered by the block.

I have tried the AutoBlockBreak LSP by Lee Mac and it is very useful except the case I need to get blocks from a Tool Palette instead of browsing from a folder.

Is there a way to easily modify the LSP? Please notice that I have no LSP programming experience.

 

Otherwise, I had an old AutoCAD lsp that used to do the work but it doesn't do anymore on AutoCAD 2008... but I can't figure out how to modify it.

I attach it here for quick reference (PIINSYM command).

 

Thanks in advance,

Cheers.

Alessandro Demontis

Rome

P&ID.txt

Posted

 

Thank you lp but the wipeout procedure is not suitable for my problem for two main reasons:

- I am not allowed to redifine the blocks (that already exist) in order to add the wipeout polygon

- i need the line to be trimmed non only for a graphical result but because of a next step where lines are used to represent attributes or moved. Imagine a plant pipe... i add the valve, or a pump, or an instrument as a block on the pipe and the polyline needs to be truncaed because after adding the block i have to be able to select the two pieces of line and move them on different layers or give them different global width values.

 

Moreover i need to be able to use the blocks from a previously created toolpalette.

 

This is an image of what I mean: the line above is the 'start situation' and the other one is the goal i would need to achieve.

 

trimmedline.png

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