WANTED : extrim.lsp or (etrim) function

I want to be able to use extrim programatically like :

(etrim <ename> <point>)

The function is not found even though i have ExpressTools installed.

I found this : extrim.lsp
but won't function in my Bricscad V21 since it cannot find another missing function (BNS_TRUNCATE_2_VIEW)...

Comments

  • There is a version of express tools for Bricscad it may have a different extrim.lsp

    Look at cookie-cutter.lsp also.

  • Hello,
    that "BNS_TRUNCATE_2_VIEW" function is part of ExpressTools, so you need to install the ExpressTools for BricsCAD as well (in appropriate version); then your extrim.lsp should work (?)
    many greetings !

  • You can give this one a try and see if it works for you.
    https://b-k-g.nl/bkg_extrim.html

  • @ALANH, @Torsten Moses , I do have Express tools installed and no luck; neither etrim, nor BNS_TRUNCATE_2_VIEW are found functions. Do you get the lisp to work? I can't...

    @David Waight, Thanks, but this is a licenced app which annoyingly prints a voucher. It is thence not suitable for my office.

    I guess i'll have to modify CookieCutter myself to get my own silent function...
    (which i knew of, yes, but who does not perform without active user input)

  • @ALANH, @Torsten Moses , I do have Express tools installed and no luck; neither etrim, nor BNS_TRUNCATE_2_VIEW are found functions. Do you get the lisp to work? I can't...

    @David Waight, Thanks, but this is a licenced app which annoyingly prints a voucher. It is thence not suitable for my office.

    I guess i'll have to modify CookieCutter myself to get my own silent function...
    (which i knew of, yes, but who does not perform without active user input)

  • @David Waight, Thanks, but this is a licenced app which annoyingly prints a voucher. It is thence not suitable for my office.

    I am the author of that application. It is a free application that certainly does not print a "voucher" (whatever that means).

  • I tried to edit my previous post. But that is no longer possible for some reason.

  • @Roy Klein Gebbinck said:

    @David Waight, Thanks, but this is a licenced app which annoyingly prints a voucher. It is thence not suitable for my office.

    I am the author of that application. It is a free application that certainly does not print a "voucher" (whatever that means).

    Every time the lisp is loaded, I get :

    BKG_Extrim - Program version 20141027 
    Copyright (c) 2011-2014 Roy Klein Gebbinck - All rights reserved 
    Use: BKG_Extrim or BXTR 
    

    Since all our office tools are loaded from ON_DOC_LOAD.lsp, so at every drawing, this is annoying...

    Again, since i am trying to use the etrim function inside another automation function, i can't use this.

    But it works great, no offense to your skills!

  • So i came up with this simple solution :

        ; Say you drew some regular 2D entities (lines, polylines and hatches) and a cutting line entity over these
    (defun c:TrimTest (/ DrawnedInfLine SidePt offsetename offsetPts1 offsetPts2 )
        (setq DrawnedInfLine (car (entsel "Pick the cutting line :")))
        (while (= SidePt nil) (setq SidePt (getpoint "On which side do you want to cut?")))
    
        ;(etrim DrawnedInfLine SidePt) would have been nice here and i would have been over for this part...
    
        (vl-cmdf "._Offset" (/ (getvar "VIEWSIZE") 75.0) DrawnedInfLine SidePt "_exit")
        (setq   offsetename (entlast)
                offsetPts1 (trans (cdr (assoc 10 (entget offsetename))) offsetename 1)
                offsetPts2 (trans (cdr (assoc 11 (entget offsetename))) offsetename 1)
            )
        (command "_.Trim" DrawnedInfLine "" "_Fence" offsetPts1 offsetPts2 "" "")
    
        (entdel DrawnedInfLine)
        (entdel offsetename)
    )
    

    Which works great on most of my attemps. But for some reason, on some attempts, there will always be 1 or 2 lines that are not trimmed... and i don't know why.

    It may be related to the use of a fence in the Trim command?

    Thoughts?

  • It seems to be related with the linetypes! Using a fence crossing a visible hole in a dashed linetype will not trim this line.
    I'm in contact with Support to find a solution.

  • That's pretty much AutoCAD compatible behavior. Seems unlikely that BricsCAD will change it.

  • @Roy Klein Gebbinck said:
    That's pretty much AutoCAD compatible behavior. Seems unlikely that BricsCAD will change it.

    Actually, recent versions of AutoCAD introduced a new variable to control how selection in gaps behave.
    AutoCAD 2018 Help: LTGAPSELECTION (System Variable)
    help.autodesk.com/view/ACD/2018/ENU/index.html?guid=GUID-C3816CB5-ED9D-4F7B-8F1A-C974E17D0FF7

    Regards,
    Jason Bourhill
    BricsCAD V22 Ultimate
    CAD Concepts

  • @1LandSurveyor said:
    It seems to be related with the linetypes! Using a fence crossing a visible hole in a dashed linetype will not trim this line.
    I'm in contact with Support to find a solution.

    A workaround would be to temporarily change the LTSCALE to a large number, which would essentially make the linetype appear as continuous. Alternatively, assuming you have MSLTSCALE = 1, you could simply change your Annotation Scale on the status bar to give a similar effect.

    Regards,
    Jason Bourhill
    BricsCAD V22 Ultimate
    CAD Concepts

  • @1LandSurveyor said:

    Every time the lisp is loaded, I get :

    BKG_Extrim - Program version 20141027 
    Copyright (c) 2011-2014 Roy Klein Gebbinck - All rights reserved 
    Use: BKG_Extrim or BXTR 
    

    Since all our office tools are loaded from ON_DOC_LOAD.lsp, so at every drawing, this is annoying...

    This wouldn't occur if you used AUTOLOAD instead of LOAD in your on_doc_load.lsp

    e.g.
    (autoload "BKG_Extrim.des" '("BKG_Extrim" "BXTR"))

    You will still see the messaging, but only when the command is invoked for the first time.

    Regards,
    Jason Bourhill
    BricsCAD V22 Ultimate
    CAD Concepts

  • @Jason Bourhill said:
    Actually, recent versions of AutoCAD introduced a new variable to control how selection in gaps behave.
    AutoCAD 2018 Help: LTGAPSELECTION (System Variable)

    Thanks. Good to know. This means that BricsCAD can do the same. :)

  • @Jason Bourhill said:

    @Roy Klein Gebbinck said:
    That's pretty much AutoCAD compatible behavior. Seems unlikely that BricsCAD will change it.

    Actually, recent versions of AutoCAD introduced a new variable to control how selection in gaps behave.
    AutoCAD 2018 Help: LTGAPSELECTION (System Variable)
    help.autodesk.com/view/ACD/2018/ENU/index.html?guid=GUID-C3816CB5-ED9D-4F7B-8F1A-C974E17D0FF7

    Regards,
    Jason Bourhill
    BricsCAD V22 Ultimate
    CAD Concepts

    Yes! LTGAPSELECTION totally solve that problem.
    Now i just need to wait for a HATCHGAPSELECTION variable... Non-solid hatches have the same problem.

    @Jason Bourhill said:

    @1LandSurveyor said:

    ...

    This wouldn't occur if you used AUTOLOAD instead of LOAD in your on_doc_load.lsp

    e.g.
    (autoload "BKG_Extrim.des" '("BKG_Extrim" "BXTR"))

    You will still see the messaging, but only when the command is invoked for the first time.

    Regards,
    Jason Bourhill
    BricsCAD V22 Ultimate
    CAD Concepts

    Good idea, that's right! but still... i cannot use it from within another LISP.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!