Results 1 to 7 of 7

Thread: Auto trim a line when inserting a block

  1. #1
    Login to Give a bone
    0

    Default Auto trim a line when inserting a block

    Hi,

    I am looking for a lisp routine that would automatically trim a line when I insert a pipe fitting block.

    Would anyone be able to help me with this? or do anyone have one similar already created?

    Thanks

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    5,446
    Login to Give a bone
    0

    Default Re: Auto trim a line when inserting a block

    I've done it with vba. See this post.
    C:> ED WORKING....

  3. #3
    Login to Give a bone
    0

    Default Re: Auto trim a line when inserting a block

    Thanks for the reply Ed.

    I'm kind of unfamiliar with using vba in AutoCAD. How can I implement this code within AutoCAD and it to be specific to the block I insert.

  4. #4
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Auto trim a line when inserting a block

    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  5. #5
    Active Member
    Join Date
    2013-07
    Posts
    66
    Login to Give a bone
    0

    Default Re: Auto trim a line when inserting a block

    Or you could take mine, from one guy who wanted to do that to another, I'll share
    These run from a DCL which is basically a popup menu where the user selects which block they want.
    The advantages for doing it this way as opposed to a CUI macro is that we have environment control code within that is designed to check and see if a layer is created, if not, it creates and sets current, if the layer already exists it simply sets the layer current and inserts on that layer.
    I'm sure you can appreciate fittings going onto the correct layer, hardcoded so that users don't have to bother with it
    Attached Files Attached Files

  6. #6
    Woo! Hoo! my 1st post
    Join Date
    2016-02
    Posts
    1
    Login to Give a bone
    0

    Default Re: Auto trim a line when inserting a block

    Could anyone tell me how to edit the .lsp and .dcl files so that I could use my own blocks? I'm trying to figure out what exactly needs to be replaced in the text to make it all work.

  7. #7
    Woo! Hoo! my 1st post
    Join Date
    2012-02
    Posts
    1
    Login to Give a bone
    0

    Default Re: Auto trim a line when inserting a block

    just edit your block and draw or create rectangular shape outside your drawing and do a command "wipeout" to select the rectangle you've created then command "wipeoutframe" then "0" (zero) to turn it OFF

Similar Threads

  1. Replies: 2
    Last Post: 2013-08-16, 02:57 PM
  2. Wire auto trim help.
    By djseibel in forum ACA/AMEP Styles Library
    Replies: 2
    Last Post: 2013-06-12, 06:29 PM
  3. Trim or extend line to line - dynamic block
    By janandraczko in forum Dynamic Blocks - Technical
    Replies: 4
    Last Post: 2009-03-02, 12:33 AM
  4. LISP trim/break line inserting block
    By aldiyars1925 in forum AutoLISP
    Replies: 1
    Last Post: 2008-09-09, 01:33 PM
  5. Replies: 1
    Last Post: 2007-02-23, 08:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •