Results 1 to 3 of 3

Thread: Modify trim routine to auto-select line based off of insertionpoint of block

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

    Default Modify trim routine to auto-select line based off of insertionpoint of block

    I am having trouble having this program autoselect the line that was nearest to the insertionpoint selected by user.If anyone could help I would greatly appreciate it
    Attached Files Attached Files

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

    Default Re: Modify trim routine to auto-select line based off of insertionpoint of block

    Just check the structure of your program ... i.e. where the open and closing parentheses are. I find it easiest to use VLIDE's autoformat to indent the Lisp according to where parentheses are placed - no need for counting. The LSP file doesn't seem to be indented correctly, so it's difficult to understand what you wanted to do. Attached is the version after formatting in VLIDE.

    E.g. these 2 lines are simply executing one after the other as lines inside a progn. I think they are meant as the 1st should be a check in an if and the 2nd should be the then clause. Though the effect makes no difference - the 1st could simply be omitted.
    Code:
          (eq 16384 (logand 16384 (getvar "osmode")))
          (setvar "OSMODE" (boole 6 (getvar "osmode") 16384))
    Attached Files Attached Files

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

    Default Re: Modify trim routine to auto-select line based off of insertionpoint of block

    Indeed, and it has been.
    Thanks for the response irneb, I know you know your stuff
    But we were successful in having this program operate, in fact I'll attach the current version in case you would like to give any comments
    These are 1 lsp and it's dcl out of the 30 or so req'd for our needs, all of them are working nice and well though, but without any error trapping...
    If you could perhaps point me in the right direction there as far as error trapping and testing user input (<--believe I am doing so on the only getpoint within the routines. Everything else autocad should take care of the error-trapping for I *believe* though confirmation would be excellent to have on this.
    Thanks again irneb/others
    Attached Files Attached Files

Similar Threads

  1. Auto trim a line when inserting a block
    By charles.hann268460 in forum AutoCAD Customization
    Replies: 6
    Last Post: 2017-11-18, 11:47 AM
  2. Merge 2 blocks based on common insertionpoint
    By CADfunk MC in forum VBA/COM Interop
    Replies: 1
    Last Post: 2013-07-11, 10:28 AM
  3. Routine to trim a Line with half a Circle
    By cadd4la in forum AutoLISP
    Replies: 15
    Last Post: 2006-11-19, 05:14 AM
  4. 8.1/E - Select line chain for boundary Trim Multple command
    By janunson in forum Revit Architecture - Wish List
    Replies: 1
    Last Post: 2005-08-31, 07:47 PM
  5. Trim command, only able to select one line at a time
    By sherflor in forum AutoCAD General
    Replies: 5
    Last Post: 2005-05-10, 07:34 PM

Posting Permissions

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