What's new

Shortcut to Export a DXF File?

Hi All

I have been using Atom 3d for a while and am generally quite happy with it. I need to generate some DXF files for our waterjet at work. Is there a way to take a sketch directly to DXF? Doing a drawing and exporting it is a bit painful. If not, well I guess that's a feature request. ;-)

Pete
 

bigseb

Alibre Super User
Painful? How? Open the model in a drawing, select the views yous want then export to dxf. Not exactly painful...

If you're just making sketches and not creating 3D models then create you sketches in the drawing workspace instead. Imo that's a far more painful way to sketch and is not really how AD is meant to function, not to mention you'll still need to export as dxf.
 

HaroldL

Alibre Super User
Hi Pete,

+10 for what bigseb stated.

The additional benefit of creating 3D models is that you can put them together in an assembly to check fit, form and function. If you are recreating your sketches in Atom 3D from other drawings or CAD files there is always the possibility of small (or big) errors creeping in. This can be typos in entering dimension values or using different tolerance settings for the redraw than what is/was on the original drawing/model. Having the 3D models for an assembly check is best.

Typos - I can't remember how many times I've seen 2d drawings get to programming or to the shop with a .125 dim that should have been .25 or visa versa. Since we started using 3D CAD that kind of error is glaring when the model is viewed.

BTW, do you mind if I ask what your experience is with CAD/drafting?
 
Hi Pete -- If your "universe" works best with 2D, why not limit yourself to 2D? There are real "advantages" to using 3D, but you need to be set-up to take advantage of them. ??? -- Lew
 

robertf

Member
I will second Pete's request. selecting a face and exporting it to dxf is a big time saver, especially if its a non orthogonal plane.
 

NateLiquidGravity

Alibre Super User
In Alibre 3d model: Click face > Click Project To Sketch > Click OK > Press Ctrl+A > Press Ctrl+C

In Alibre drawing: Right Click open area > Activate Sketch on Sheet > Press Ctrl+T > Click in open area
 
Last edited:

robertf

Member
Yes Nate. I'm familiar with the work flow, I just miss it as a standard automated feature that preserves profile origin like many of the other CAD packages I use.
 

robertf

Member
only the sketch of this face or a complete view orthogonal to the face/sketch plane?
How often to you do this a day?
Regards
Stefafn

The other CAD packages I've used export only features on the plane. It might be nice to be able to export the transformed profiles that are visible from that plane. An option to place origin at the centroid and adjust angle or snap an axis to a line would be a big time saver too.

Regarding frequency, every project is different. I've got 1 coming up that I'll likely end up importing in another CAD package to export all of the faces directly to save time.

Don't take this as an Alibre bash. IMO it is far superior in many ways to the other CAD packages I use for many things, but there is always room for improvement and this seems like low hanging fruit.
 

NateLiquidGravity

Alibre Super User
OK, AlibreScript and the API was problematic - so I went back to my roots and made an AutoHotkey script.

Code:
#SingleInstance,Force
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode, 2


; === ALIBRE EXPORT FACE ====
#IfWinActive, Alibre Design
^f::
KeyWait Control
BlockInput On
Send {Alt Down}k{Alt Up}
Send p
WinWait, Project To Sketch,, 1
if ErrorLevel
{
  Send {Esc}
  BlockInput Off
  MsgBox, Face must be selected first to export.
  return
}
else
{
  Send {Enter}
  WinWaitClose, Project To Sketch
  Sleep 200
  Send {Control Down}a{Control Up}
  Send {Control Down}x{Control Up}
  Sleep 200
  Send {Alt Down}k{Alt Up}
  Send a
  Sleep 200
  Send {Control Down}{Shift Down}d{Shift Up}{Control Up}
  Sleep 200
  WinWait, New Sheet Properties, Blank Sheet
  ControlClick, Blank Sheet
  ControlClick, Create Empty Drawing
  Send {Enter}
  Sleep 200
  WinWait, Standard Views Creation
  Send {Esc}
  Send {Control Down}k{Control Up}
  Send {Control Down}v{Control Up}
  Send {Control Down}k{Control Up}
  Send {Home}
  Send {Alt Down}f{Alt Up}
  Send e
}
BlockInput Off

To run the script you need AutoHotkey installed (or ask me for a standalone .exe version) :
https://www.autohotkey.com/
Download and Install the current version of AutoHotkey.
Copy and paste the code into Notepad.
Save the code into a text file with .ahk file extension. Double click on the script to run it.
In Alibre select a face and press Ctrl+f
Wait until it asks then save an export.
 
Last edited:

Cator

Senior Member
Nate I was able to solve by deleting the line WnWait Standard Views Creation...

Code:
#SingleInstance,Force
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode, 2


; === ALIBRE EXPORT FACE ====
#IfWinActive, Alibre Design
^f::
KeyWait Control
Sleep 500
BlockInput On
Send {Alt Down}k{Alt Up}
Send p
WinWait, Project To Sketch,, 1
if ErrorLevel
{
  Send {Esc}
  BlockInput Off
  MsgBox, Face must be selected first to export.
  return
}
else
{
  Send {Enter}
  WinWaitClose, Project To Sketch
  Sleep 200
  Send {Control Down}a{Control Up}
  Send {Control Down}x{Control Up}
  Sleep 200
  Send {Control Down}{Shift Down}d{Shift Up}{Control Up}
  Sleep 200
  WinWait, New Sheet Properties, Blank Sheet
  ControlClick, Blank Sheet
  ControlClick, Create Empty Drawing
  Send {Enter}
  Sleep 200
  Send {Control Down}k{Control Up}
  Sleep 200
  Send {Control Down}v{Control Up}
  Sleep 200
  Send {Control Down}k{Control Up}
  Send {Home}
  Send {Alt Down}f{Alt Up}
  Send e
}
BlockInput Off
 
Last edited:

Cator

Senior Member
Albie tries resetting p for Project to Sketch.
It worked in my case. Or lengthen the wait time after keywait control.
Regards
Francesco
 

albie0803

Alibre Super User
Tried both of those, but as I said, the selected face doesn't stay selected, so the project to sketch window doesn't capture anything.
I have worked around it by adding these lines to the script,
Code:
BlockInput On
Send ^k
MsgBox,,, Select the face, 4
Sleep 1000
Send p
WinWait, Project To Sketch,, 1

which gives me time to click on the face again and then it works.
 

Cator

Senior Member
Albie I noticed a different behavior between making the scrippt work in .ahk format or through the .exe you create. How do you use it?
 

albie0803

Alibre Super User
Its still the same .ahk script, I just added the msgbox line to tell me to select a face and the Sleep 1000 line to give me time to do it.
 

Old Geeser

Senior Member
I am new to Alibre, but I find this routine very interesting. I installed hotkeys and have cut and pasted this routine into a file and it works but gives me a "Face must be selected to export" message. I don't yet know exactly where to put the routine that albie0803 wrote. Please give an example of the complete routine.
Thank you
Karl
 

albie0803

Alibre Super User
Here is the complete script

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#SingleInstance,Force
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode, 2


; === ALIBRE EXPORT FACE ====
#IfWinActive, Alibre Design
^f::
KeyWait Control
Sleep 500
BlockInput On
Send ^k
MsgBox,,, Select the face, 4
Sleep 1000
Send p
WinWait, Project To Sketch,, 1
if ErrorLevel
{
  Send {Esc}
  BlockInput Off
  MsgBox, Face must be selected first to export.
  return
}
else
{
  Send {Enter}
  WinWaitClose, Project To Sketch
  Sleep 200
  Send {Control Down}a{Control Up}
  Send {Control Down}x{Control Up}
  Sleep 200
  Send {Control Down}{Shift Down}d{Shift Up}{Control Up}
  Sleep 200
  WinWait, New Sheet Properties, Blank Sheet
  ControlClick, Blank Sheet
  ControlClick, Create Empty Drawing
  Send {Enter}
  Sleep 200
  Send {Control Down}k{Control Up}
  Sleep 200
  Send {Control Down}v{Control Up}
  Sleep 200
  Send {Control Down}k{Control Up}
  Send {Home}
  Send {Alt Down}f{Alt Up}
  Send e
}
BlockInput Off
 
Top