Search the Community
Showing results for tags 'ordinate'.
Matt_D posted a topic in AutoLISP, Visual LISP & DCLHi All. This is my second attempt to post this since somehow I was logged out automatically. Thankfully I had most of this saved via a notepad file. Now down to business: I'm good with CAD, but when it comes to LISP, i'm a complete beginner. My boss/manager has asked me to create a LISP routine that will be run with a command from the command line and will receive user input to compare to ordinate dimensions within the drawing. I've been on this for two days, trying to wrap my head around even the basics and I can tell you my brain hurts. Programming of any sort is not my forte, i'm still struggling with getting HTML down. Anyways, the reason why my boss would like this is because sometimes our drawings have from a dozen to 50 or so ordinate dimensions and it's tedious to go and check them all against a point. My boss has given me free reign on how to design this sucker, but I'm stumped at how to program it as I'm a newbie. Below is what the lisp routine should be able to accomplish. The idea for the LISP is this: 1.) Load the lisp up and have it start with a defun C: command. 2.) have the user pick an 'origin' point for comparison (because we don't always use 0,0,0). 3.) the lisp takes this point and stores it. 4.) It scans the drawing for Ordinate Dimensions only. 5.) It compares the origin point of the user to the origin point of the ordinate dimensions. (I figure this would be the endpoint closest to 0,0,0. So for instance, if we have 15 dimensions, there are 30 endpoints. The 15 closest endpoints would be the ones that are compared to the origin point of the user.) 6.) It creates a new layer called DIM_WRONG [or whatever] and makes the layer RED. 7.) It draws attention to the incorrect ordinate dimensions (the ones scanned and compared to the user's origin point) by drawing either a red box around the dimension or a rev cloud. these rev clouds are placed on the DIM_WRONG layer, with the layer set to not plot. This way we can easily check between 15 and 30 and more ordinate dimensions with a few clicks. There would be a tolerance in the comparison, up to 1/64 of an inch tolerance. If the ordering steps needs to be adjusted because of programming structure, so be it, it just needs to compare those ordinate dimensions with a user assigned origin point, entered by keyboard or mouse. Again, I'm a beginner with Lisp and I've been trying to get segments done and have been only able to get 4 of the easy ones done (from that list). I've never been good at programming with anything. Any help would be vastly appreciated and I thank you for any advice/knowledge that you can bestow.
I'm currently using AutoCAD Electrical 2013, but I think that this may fall under a general AutoCAD question. The company I'm working for does panel layout drawing that require upwards of several hundred holes to be punched into it. Right now, we use ordinate dimensions to show center points of all the holes for our hole punch machine. Recently, we decided to start putting the X,Y dimensions on an Excel spreadsheet for easier reading for our punch operator. What I'm looking for is a way to either A) extract the ordinate dimensions from AutoCAD and into an excel file or B) Extract the hole center locations from a specified base point to an Excel spreadsheet. Is there an easy way to do this or do I have to go one by one and type it out? Thanks in advance for your help.