510,030 active members
3,354 visitors online
Register for free
Login
IndustryArena Forum > CAD Software > Autodesk > Auto Generating DXF
Results 1 to 6 of 6
  1. #1
    Registered
    Join Date
    Feb 2006
    Posts
    72

    Auto Generating DXF

    I need some help generating a DXF file using variables.

    My goal is to auto generate about over 91,000 DXF files for a very simple form. The variables will set the size of a rectangle as well as add varying radii to the two bottom corners of the rectangle.

    Rectangle range 1.5-9.5mm in 0.5mm increments
    Each radius will range from 3.2-9.2mm in 1mm increments

    It's been a while since I've touched QBasic or Visual Basic.
    I only have access to AutoCad LT version, so LISP is out. I cant figure out how to do this as a script. It doesn't appear that script files support variables.

    Can anyone help me?

  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Posts
    34611
    You could probably use a VBA macro in Excel to write a ascii .dxf file. More dificult than automating the saveas command, which is what I think you want.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Registered
    Join Date
    Feb 2006
    Posts
    72
    I'm in a bit over my head here. I haven't touched any programming of this type in years and I'm a long way from getting all the cob webs out.

    I'm not sure what you mean about the VBA Macro. I did write a simple program using QBASIC to generate each variation. I did that just to calculate how many DXF files I would end up with. I just need to figure how to generate the DXF using those variable. In the end, coding DXF directly may be far from my abilities.

  4. #4
    Registered
    Join Date
    Feb 2006
    Posts
    72

    Smile

    Well, I cheated a bit. But I was able to git 'er done.
    I drew a simple form in autocad and saved as a DXF. Then I copied the header info from that file and saved it on its own. I then used a shell command to copy that to a new file name for each variable and appended the new geometry data. Once I got going on it, it became quite simple. I was able to shake a few cob webs loose in that ol' brain of mine.

    I REALLY have to log some hours in on Visual Basic some day.

    Thanks for the suggestion "ger21" and the quick response.
    It's always nice to find those who are eager to help others.

  5. #5
    Moderator Switcher's Avatar
    Join Date
    Apr 2005
    Posts
    3634
    So you created 91,000+ dxf files?

    *************************

    I wrote a small program that creates a simple square .dxf file, with vb.net 2008. It's not really finished, but could be a starting point?

    I'll clean it up a bit, before I post it.


    .
    Free DXF - vectorink.com

  6. #6
    Registered
    Join Date
    Feb 2006
    Posts
    72
    Yep, in a matter of minutes.

    The "rectangle" sizes range was 4 to 30mm long by 1.5 to 9.5mm wide.
    Then, each one had a partial or full radius at either or both ends that ranged from 3 to 9mm.
    The fourth variation had a 1x45° chamfer at the opposite corner of the width.

    In all, I had 91,800 shape variations.

    But, the program worked flawless and kept me from having to do each one "manually".

Similar Threads

  1. mastercam generating R
    By casta-baga in forum Mastercam
    Replies: 14
    Last Post: 04-20-2008, 01:13 AM
  2. Post generating, non-executable gcodes
    By cansucuoglu in forum Post Processors for MC
    Replies: 3
    Last Post: 03-17-2008, 05:25 PM
  3. Generating code with Camsoft AS3000
    By Bap in forum CamSoft Products
    Replies: 4
    Last Post: 09-21-2007, 07:26 PM
  4. Generating code from solid
    By adryan in forum BobCad-Cam
    Replies: 3
    Last Post: 03-06-2007, 11:10 PM
  5. generating tool paths from solids
    By jderou in forum BobCad-Cam
    Replies: 5
    Last Post: 10-26-2005, 12:04 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
  •