Results 1 to 7 of 7

Thread: extrim in vb

  1. #1
    Member
    Join Date
    2004-06
    Posts
    42
    Login to Give a bone
    0

    Default extrim in vb

    wanna create command in vba just like 'extrim' but with modifications, so i take a look at the lsp

    but i really dont know lisp, so dont know what it does

    i would like to know the procedure of this lsp just to start the same in vba
    anyone can help?¿
    Attached Files Attached Files

  2. #2
    100 Club mtuersley's Avatar
    Join Date
    2001-12
    Posts
    122
    Login to Give a bone
    0

    Default Re: extrim in vb

    Well, since no one else helped you, I might as well. To cut to the chase, forget this and move on because there is nothing in here that can really help you. This lisp uses the TRIM command to do the trimming and plays around with moving objects around incase the object has a linetype that includes "spaces" that would not be caught using TRIM [that won't happen using vb/a].

    In vb/a, there is no trim command so you need to make your own. Yes, you could 'cop' out and usee the sendcommand but I wouldn't recommend it because you'll face the same hurdles as the lisp approach plus more. What you need to do is define your trim boundary object[s] and check for intersections using IntersectsWith. For anything that does intersect, grab the intersection point and revise the entity's start/end point to be the intersection point. A lot more difficult than it sounds but it can be done.
    Last edited by mtuersley; 2004-10-02 at 04:41 AM.

  3. #3
    Member
    Join Date
    2004-06
    Posts
    42
    Login to Give a bone
    0

    Default Re: extrim in vb

    Quote Originally Posted by mtuersley
    What you need to do is define your trim boundary object[s] and check for intersections using IntersectsWith. For anything that does intersect, grab the intersection point and revise the entity's start/end point to be the intersection point. A lot more difficult than it sounds but it can be done.
    this part is not difficult, but once you have the intersection points and break a line in two parts you must decide wich part is inside and wich outside, thats the problem

    i saw a post in other forum about this, making a ray from a point (the vertex of every part of the line in this case) you know if is inside a boundary cos the ray have a pair number of intersects (impair if is outside)

    but looking the lisp (dont know lisp but can catch some process) it seems to use other method, so i wanted to know what kind of process it uses, an general idea to start my vba routine

  4. #4
    100 Club mtuersley's Avatar
    Join Date
    2001-12
    Posts
    122
    Login to Give a bone
    0

    Default Re: extrim in vb

    Ok, first off you're not going to break anything in vba - you're going to change points. Use the thread you mentioned and try approaching it that way. When I said the lisp routine was using the TRIM command, I meant it. It is drawing a fence, based on user input and trimming with it. The user is selecting inside the boundary for the program. I saw nothing for figuring out inside vs outside. You could also try posting in the AutoLISP ng and you might get a better answer because my lisp is rusty.

  5. #5
    Member
    Join Date
    2004-06
    Posts
    42
    Login to Give a bone
    0

    Default Re: extrim in vb

    ok, ill try in lisp forum
    thanks for you reply

  6. #6
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: extrim in vb

    Quote Originally Posted by mtuersley
    ... because my lisp is rusty.
    Shouldn't that be: "my lipth ith ruthty?"

  7. #7
    100 Club mtuersley's Avatar
    Join Date
    2001-12
    Posts
    122
    Login to Give a bone
    0

    Cool Re: extrim in vb

    Nice! Should've seen that one coming! =)

Similar Threads

  1. Extrim
    By z_ayri788300 in forum AutoLISP
    Replies: 1
    Last Post: 2013-01-16, 12:38 PM
  2. Error using EXTRIM command
    By jason.cyr13 in forum AutoCAD General
    Replies: 1
    Last Post: 2007-12-03, 08:45 PM
  3. Trying to use a Block to ExTrim to
    By ReachAndre in forum AutoLISP
    Replies: 4
    Last Post: 2006-10-25, 12:53 PM
  4. Extrim command for AutoCAD 2005 ?
    By jdcincy in forum AutoCAD General
    Replies: 6
    Last Post: 2006-03-24, 05:37 PM
  5. extrim - how it works?
    By inner69923 in forum AutoLISP
    Replies: 15
    Last Post: 2004-10-26, 08:56 AM

Posting Permissions

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