1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Anyone know how to import a DXF for use in an AddExtrudeCut operation using AlibreScript?

Discussion in 'Alibre Script' started by scidog, Jan 13, 2021 at 11:58 PM.

  1. scidog

    scidog Member

    Hi All,

    Attached are 3 files:
    • squareSlabFromScript.py
    • 5mmCutoutACAD14.dxf
    • wish_I_could_make_with_script.AD_PRT

    I can by "conventional means" open the DXF and use it to cut out a void in the slab made by the Alibre script. That's easy.

    What I cannot do is import the DXF into the Alibre script and make the extrude cut from within Alibre script.

    Anyone...please help, and thanks in advance for even trying.

    Thank you for your valuable time,


    Attached Files:

  2. NateLiqGrav

    NateLiqGrav Alibre Super User

  3. scidog

    scidog Member

    Thanks for the fast reply man!

    So, in short are you saying that I simply cannot import a DXF onto a face via Alibre script?

    I use AutoHotKey scripts, but mine are very simple scripts.

    If I understand your reply, the cited AutoHotkey script exports a DXF from a face.

    But I wish to import a DXF onto a planar face of the slab made via Alibre script.

    I do not wish to export anything, as my DXFs are all made beforehand.

    I have lots of 2D DXF profiles I am cutting out of foam slabs to place products in, for packaging. The foam slabs are easy to auto-generate with Alibre script as they are just blocks of various dimensions. Thus far I have been taking my 2D DXF outlines and inserting them onto a foam block using the manual procedure below.

    (I know this procedure is common but I just want to be sure that I don't have idiosyncrasies that would confuse someone, so here is how I do it.)

    • Run the script "squareSlabFromScript.py" and make my slab
    • Leave the 3D model of the slab open
    • Open the DXF file "5mmCutoutACAD14.dxf"
    • Activate 2D Sketch in the drawing
    • Select the 2D shape (My DXF circle, already centered at X0Y0)
    • Copy the selected 2D shape in the drawing
    • Go back to the 3D model
    • Select the top face of the 3D slab
    • Right-Mouse "Activate 2D Sketch"
    • Select the center dot on the face of the slab
    • Right-Mouse Paste the 2D entity onto the face of the slab
    • Extrude cut---viola' I have a hole in my slab

    I never export anything.

    I just want to get that DXF onto the face of the slab.

    Hope that helped.


  4. NateLiqGrav

    NateLiqGrav Alibre Super User

    The export script linked was only an example of what can be automated. If you pick that script apart you should see how it works to construct one for your workflow.
  5. scidog

    scidog Member

    I will do just that.

    FYI: Looks like an "external way" like AutoHotKey is the only way, for now and perhaps a long time, thus sayeth Alibre support.

    Makes sense: kind of an niche request on my part...



Share This Page