Customizing AutoCad (scripts/vba, etc...)

For discussions related to ski/snowboard construction/design methods and techniques.

Moderators: Head Monkey, kelvin, bigKam, skidesmond, chrismp

Post Reply
kirol
Posts: 34
Joined: Tue May 15, 2007 7:55 pm

Customizing AutoCad (scripts/vba, etc...)

Post by kirol »

Hi,

I was wondering if anyone had any experience customizing AutoCAD to better suite ski design and machining. I am very familiar with using the AutoCAD command lines, and pretty familiar with using the software. I have never created a script, or a macro to run in the program. I know it can be done and is based off the command prompts.

I am interested in writing code to generate core files, template files, etc.. off of a ski outline. I am interested in doing something similar to the Solidworks add-ins described in this thread. viewtopic.php?t=3265

I know it is possible to customize AutoCAD to do just about anything, I am wondering if anyone has done this before or has any advice.

Thanks
User avatar
threeninethree
Posts: 172
Joined: Fri Feb 23, 2007 8:11 pm
Location: Massachusetts

Post by threeninethree »

It is possible, but it is kind of a lost art. What you describe is basically Snocad, do you have it?
~ Matt
kirol
Posts: 34
Joined: Tue May 15, 2007 7:55 pm

Post by kirol »

I have SnoCAD. I'm not looking to automate the ski design process, rather the work that must be done after a ski is designed. Mainly making a core and base template file. I know its really simple, which is why it should be fairly straight forward to write a program to do this for me from my file.
skidesmond
Posts: 2337
Joined: Tue Apr 07, 2009 3:26 pm
Location: Western Mass, USA
Contact:

Post by skidesmond »

An Excel spreadsheet could accomplish what you're looking for although it won't give a pictorial view. That's what I use, I plug in the final ski dims and it gives me the core, sidewall and shape dims. Let me know if this is what you're looking for and I'll send it to you.
User avatar
vinman
Posts: 1388
Joined: Fri Nov 09, 2007 4:16 pm
Location: The tin foil isle
Contact:

Post by vinman »

I'd like a copy of that. Check your messages.
Fighting gravity on a daily basis
www.Whiteroomcustomskis.com
skidesmond
Posts: 2337
Joined: Tue Apr 07, 2009 3:26 pm
Location: Western Mass, USA
Contact:

Post by skidesmond »

Here's a Excel spreadsheet I've been using to help me figure out the dimensions for ski building, cost of materials and profit/loss calcs. Feel free to download and modify it to suite your needs.

The ski core calculator is the second sheet. Enter your finished ski/board dims in the yellow area. The rest is calculated for you. I also have some default numbers I use that are in blue. Yours maybe different.

Email me any question you may have about it.

barnboy
Posts: 52
Joined: Wed Oct 20, 2010 4:19 pm
Location: Adirondacks (Westport, NY)

Post by barnboy »

Wow man, pretty awesome, love the cost figuring. Awfully cool of you to share!
User avatar
MontuckyMadman
Posts: 2395
Joined: Fri Jun 20, 2008 9:41 pm

Post by MontuckyMadman »

Thats the 333 speadhseet right?
kirol i think is talking about tool paths so you dont have to reprogram for every new core profile i think?
i have no idea how to ddo that
sammer wrote: I'm still a tang on top guy.
skidesmond
Posts: 2337
Joined: Tue Apr 07, 2009 3:26 pm
Location: Western Mass, USA
Contact:

Post by skidesmond »

MontuckyMadman wrote:Thats the 333 speadhseet right?
kirol i think is talking about tool paths so you dont have to reprogram for every new core profile i think?
i have no idea how to ddo that
Yup, 333. I unprotected the cells so it's more flexible and tweaked it a bit.

btw- Was it Rich who was creating a more versatile version of SnoCAD-X?
kirol
Posts: 34
Joined: Tue May 15, 2007 7:55 pm

Post by kirol »

Hey guys,

Thanks for the help and the spreadsheet.

What I am trying to do is automate the AutoCAD process. With every ski that is designed, a few other files are generated based off the ski file. I follow basically the exact same steps every time I make a supporting file (ie core, template, etc.

There are ways to make applications that run within AutoCAD that could automatically make all other template files by running an application or a script within the file. The problem is I don't know how to program user input from a mouse. Scripts are basically set up as a screen of keyboard commands. For actions like offset and trim that require the user to click a point or a line I am not sure how to do that with keyboard input. I consider myself to be pretty competent in AutoCAD and I feel like with some sort of example or tutorial I could figure out how to do the task I am trying to complete. I have looked at a few tutorials but none of them perform very complex tasks, they were mostly for plotting or inserting blocks. I couldn't find any tutorials or examples similar to my application.
User avatar
threeninethree
Posts: 172
Joined: Fri Feb 23, 2007 8:11 pm
Location: Massachusetts

Post by threeninethree »

What you are asking is a fairly heavy coding job, not simply a string of commands.

Your best bet is to post your question on the Autodesk customization forum:
http://forums.autodesk.com/t5/AutoCAD-C ... /ct-p/1002
~ Matt
TahoePowder
Posts: 33
Joined: Thu Aug 18, 2011 8:25 pm
Location: Reno, NV

Post by TahoePowder »

They are called LISP routines. This looks to be fairly promising:

http://www.draftsperson.net/index.php?t ... rogramming

I have some co-workers that have created routines for monotonous tasks. I haven't completely looked through the link above, but I'll give it a read tomorrow at work and see what I can find and touch base with a few co-workers. I've been working with CAD for 10 years or so now. I've actually thought of doing a similar thing. The tough part will be the program design to break it down to its simple command forms. Could be the next revolution??! Maybe.

Thanks for the spreadsheet SD! I love me some excel.

I hope to post some progress before the snow flies!
TahoePowder
Posts: 33
Joined: Thu Aug 18, 2011 8:25 pm
Location: Reno, NV

Post by TahoePowder »

Kirol-
Ive got some basic routines from coworkers, and some advice from them...depending on what you want to do, it could be a little complicated. Pm me if you want to talk specifics.
kirol
Posts: 34
Joined: Tue May 15, 2007 7:55 pm

Post by kirol »

TahoePowder-

Thanks for the links, research and help. I plan to further pursue this later in the fall when I have more time out side of work. I have been buried lately. I read the tutorials and they seem fairly straightforward, I just need to dedicate a large block of time to this. I am definitely interested in seeing what your co workers have to say.

Thanks
Post Reply