AllExperts > Experts 
Search      

AutoCAD

Volunteer
Answers to thousands of questions
 Home · More Questions · Question Library  · Free Encyclopedia ·
More AutoCAD Answers
Question Library

Ask a question about AutoCAD
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
About Scott Cook
(Top Expert on this page)

Expertise
I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!

Experience
Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com. PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.
   

You are here:  Experts > Computing/Technology > Computer-Aided Design > AutoCAD

Questions Answered By Expert  Scott Cook 
In Category  AutoCAD

SubjectDate Asked

thaw layer lisp9/12/2008
  Q: I'm looking for a lisp routine that will allow me to choose a layer that I would like to thaw by ...
  A: That's a little different than what is available out there now. It certainly could be written. It's ...
AutoCAD 14 Vista vs. XP9/5/2008
  Q: I have autoCAD 14 and am now debating getting a new vista computer or staying with the windows XP. ...
  A: the big mail-order and computer box stores are all selling computers with vista now. of course since ...
CUI Customization8/21/2008
  Q: I am trying to customize our inhouse cui menu file. Our IT boys are too busy right now and can not ...
  A: If your old .mns file still reflects the current state of your menu, you can use notepad to add the ...
Assigning ID to Polylines in AutoCAD8/5/2008
  Q: Mr Scott, Good morning, I am Purushotham working with Fugro Peninsular (Fugro group). I have a ...
  A: Not possible with built-in autocad, this would require a lisp routine to do, and if the text in line ...
Assigning ID to Polylines in AutoCAD8/4/2008
  Q: Mr Scott, Good morning, I am Purushotham working with Fugro Peninsular (Fugro group). I have a ...
  A: Entity handles are unique identifiers generated by autocad that don't change between sessions, etc. ...
Linetypes with lisp7/8/2008
  Q: I have little experience with lisp, but i know some basic things. My company has a lisp that will ...
  A: There is a function called tblsearch you can use to determine if the linetype you are about to load ...
Specific Line types6/11/2008
  Q: Hallo, I would like to know how I can draw lines which are somewhat different from the ones that ...
  A: If you only want one arrow, it might not be possible with a linetype. If I recall correctly, ...
Layer Lisp5/27/2008
  Q: How do i set up a standard lisp routine for the company's layers so that when new projects or sheets ...
  A: the simplest thing to do does not involve any programming at all. make an empty drawing with all ...
Changing Attribute by double-clicking5/2/2008
  Q: I know you are familiar with the below process but just to give you an idea of my process flow: I ...
  A: This would require a lisp routine that would allow for selection of both blocks and prompt for the ...
attribute text problem4/28/2008
  Q: I am having a problem in a specific file with my attributes. in model space they seem normal when I ...
  A: You need to open the block itself on disk and use DDEDIT and LIST to look at the text justification ...
back to basics4/17/2008
  Q: Using AutoCad 2008 and have been using AutoCad for about 6 yrs. so I feel pretty profficiant BUT ...
  A: I'm not sure what you mean be "other text" but I'm assuming you are referring to the text that is ...
Breaking lines (special)4/15/2008
  Q: My English is not perfect, but I will try to be as clear as I can. So my task is to make an Autolisp ...
  A: is there empty space between the lines? or do the endpoints match? if there is empty space, put in a ...
Defpoints3/24/2008
  Q: I'm new in using CAD and I have a question What's a DefPoint, What's their purpose/ importance?
  A: defpoints is a layer that doesn't plot. anything you put on it won't plot, it's a holdover from ...
Need autoscript for inserting text in paper space3/4/2008
  Q: I am currently seeking assistance in creating a script so it can add a line of text in the title ...
  A: that is doable, but it would be custom for your application. there is no way to "detect" the ...
Need a Lisp File2/26/2008
  Q: my name Bill Curtis, I'm an Irrigation System Designer. I know there is a Lisp file made to suit my ...
  A: Yep that's pretty easy alright. It would be a select objects prompt, with a filter, then an simple ...
Survey Drafting LISP routine2/21/2008
  Q: I have been using AutoCad for many uears now and I have never found a lisp routine that will ...
  A: It seems to me that an elev attribute was used in the point block at other places with no leader at ...
Plotting lsp/hotkey2/12/2008
  Q: I am a very novice user of AutoCAD2008. Would you be able to provide a little help on creating a ...
  A: I wrote a program called Plot2000 that makes plot macros. It also does batch plotting, and it does ...
Attributes1/14/2008
  Q: How do i add attributed text to an existing title block, in auto cad 2008.
  A: If you have the title block by itself as a block you can insert, just open up that file and use the ...
acad.lsp1/10/2008
  Q: What would the code be to see if a lisp is already loaded and if it is don't load it again. Thanks!
  A: I do something like this: (defun c:setup () (load "setup") (c:setup) ) this defines a "stub" ...
Importing text file into AutoCAD20051/1/2008
  Q: I have created a text file with layers name , color and linetype. How do I import it into ...
  A: You might be able to make a script file out of it, which is a sequence of commands as you would type ...
text style12/14/2007
  Q: Help! I seemed to have lost my favorite font. I don't know how or why. It is the "archstyl.shx" ...
  A: do a (findfile "archstyl.shx") at the command line. it will tell you if autocad can see the file on ...
Lisp routine12/11/2007
  Q: I need a lisp routine that will have each set of text on a dwg. to be it's own block, so that when ...
  A: I'd take a look at the DXF reference for dimensions and see if there is an override value stored ...
LISP routines12/6/2007
  Q: I would like to make a lisp routine to detect and replace shapes (circles and arcs) in a drawing ...
  A: it would be possible, but I don't have anything like that on hand. you would need to do a lot of ...
Resource for AUTOLisp11/30/2007
  Q: I am trying to learn AUTOLisp basic structure and commands format but can not seem to find any ...
  A: There are books out there, although I haven't bought one for a long time. 'Customizing AutoCAD' used ...
OBJECT PROPERTIES11/2/2007
  Q: I have the idea for a macro, but am unable to progress. I can not find where proporties for ...
  A: you need to use the entget function to get the data that is stored in the viewport entity itself. ...
Running a script at the AutoCAD start up11/1/2007
  Q: I am trying to process multiple drawings using .bat file which launch the ACAD 2006, at the start up ...
  A: I have several random thoughts on this: 1. you might need a space between the /b and the scriptfile ...
autolisp10/30/2007
  Q: I want a lisp routine that will simplify this action for me. I'm using this on P&IDs. Where two ...
  A: well, I have done this, but I can't share the routine because it was work-for-hire for another ...
Autolisp for breaking lines10/21/2007
  Q: I am creating an autolisp program for modifying which is to break lines at the intersecting points ...
  A: you can do a fence selection to find all the lines that cross it. you can further limit that by ...
PolyCen(ter) lisp question9/18/2007
  Q: I am not a Lisp programmer. I found this lisp program on the internet a few years back, and used it ...
  A: someone asked me the same question before (was it you?). the answer is the same. get rid of the ...
lisp fro creating topo profiles9/17/2007
  Q: I have a part-time AutoCAD user who has an old lisp routine that creates a profile from a line ...
  A: I don't know anything about your routine, but past experience is that lightweight polylines break ...
Linking attributes to object properties8/23/2007
  Q: I would like to know if there's a way to link an attribute to certain property values of an object. ...
  A: not without a custom routine. there might be something built-in to building systems to do that if ...
creating a lisp routine8/5/2007
  Q: I am trying to create a lisp routine that I can turn off a group of mutiple layers with only 2 key ...
  A: sorry, I've been on vacation. you need to use notepad or similar and save the routine to a file ...
macros7/20/2007
  Q: Scott, I use acad 2007 and I am trying to set up a button on my custom toolbar that will scale all ...
  A: ditch all that for this: ^C^Cscale;all;;0,0;0.039370079 you might have to play around with it a ...
arc length within lisp7/16/2007
  Q: Within a lisp, can you select an arc and then call up it's length for calculations?
  A: sure. look at the dxf reference in the online help for the entity codes which you can retrieve with ...
can't arrange block atributes7/8/2007
  Q: I'm a traffic engineer and I'm working with a network of a big city, I imported a file from a GIS ...
  A: there should be a lisp routine available to do what you want. I used to use one called PET for that ...
Qleader6/19/2007
  Q: i have some kind of silly problem. i am trying to set a dim style that draw dash lines. i can get ...
  A: I'd probably make a custom arrow block with the linetypes within set to byblock. try that and see ...
AutoCAD non-attributed text within a block6/11/2007
  Q: I have a block, "FORMAT" on a large group of drawings. There is a non-attributed text ...
  A: the xy of the insert is stored in a different coordinate, perhaps 11. I think 10 is perhaps the ...
autolisp cannot call symbols5/16/2007
  Q: When i run a lisp that calls a symbol it says it cannot find the file path. I can however insert the ...
  A: it will be one of two things: 1. the path is hard-coded into the lisp routine and is now incorrect, ...
Attribute adding5/15/2007
  Q: I have one doubt sir, That is how to add attribute data to existing block.
  A: you have to redefine the block, then use a lisp routine to update the ones that are already ...
VLR-Mouse-Reactor5/4/2007
  Q: I have previously used an Autolisp program and it worked fine. It is a program to draw curved text ...
  A: Did it work with an earlier version of autocad? when did you notice that it broke? You may need to ...
make a command3/7/2007
  Q: I am the cad operator at a landscape firm that uses blocks of circles at different sizes to convey ...
  A: if they were 3d blocks, you could probably HIDE them, which would remove everything under them, but ...
complex linetype2/25/2007
  Q: can I insert a fraction in a line type
  A: you'd probably need to make a custom shape file with the stacked fraction then use that in a ...
change company name on DWG12/13/2006
  Q: I hope you can shine some light on this because it will make my task ahead much easier. I am ...
  A: you can redefine the block and the attributes of currently-inserted blocks will remain the same - ...
xref layers10/2/2006
  Q: Is there a way to get a listing of all the entities associated with a xref which are turned on and ...
  A: yes but it's a very complex operation. you have to iterate through the layer table to determine ...
Saving mass drawings into earlier file formats9/29/2006
  Q: The problem is that if I have 150 files saved in ACAD 2007 version then I must open each one ...
  A: you'll need a batch processing program. I have one I give away called runbatch, which you can get by ...
AutoCad 2004: Tallying numbers within individual text boxes5/24/2006
  Q: As a landscape architect for a municipal body using autocad 2004 for planting plans, I end up with ...
  A: make sure the tags are blocks with attribute tags. then play around with the attext command to see ...
AutoLISP - assoc 50 rotation angle3/4/2006
  Q: AutoCAD 2006, I would like to create a LISP routine that filters my selection to a certain block ...
  A: I think it would be something like this: (setq ss1 (ssget "X" '( (-4 . "<AND") (2 . ...
Launch Access DB from ACcad with LISP2/28/2006
  Q: I want to launch an access database program .mdb or .mde file from a pop-up dialog I've create in ...
  A: I've seen this before, not with access but a different app we were working with. I think we did ...
AutoLISP - determine screen resolution11/11/2005
  Q: How can you determine the screen resolution using Autolisp? It's important when displaying slides. ...
  A: here's a chunk of code that will do it for you. I had the same problem already with something else. ...
Attribute Reference Object Issues8/24/2005
  Q: I have a VB 6.0 program that I have been using succesfully with Acad 2002 to extract the values of ...
  A: vb is out of my area of expertise. however if it works in the other version fine, I've seen that be ...
lisp programing8/3/2005
  Q: Would you inform me listing of sub program in lisp file, to make it limited using only 10 times, ...
  A: there is no special way to do this with vlisp any different from any other programming language. ...
Arc length vs Chord length6/22/2005
  Q: While drawing site plans I have problems with arc. My information from the city provides radius & ...
  A: there are something like 13 or 15 options to the arc command. I don't know them all, however I have ...
regedit message5/16/2005
  Q: Aloha from Hawaii, My question concerns an AutoCAD alert I always receive upon startup. The message ...
  A: the profiles are just registry files. it's got nothing to do with authorization. you can modify your ...
Xref'ed Layer Colors5/1/2005
  Q: Mr Cook: We're in the process of standardizing our drawings starting w/ our layering schemes. ...
  A: sorry, I just realized you were asking about changing existing layer colors. That's another common ...
Autocad File Converter3/2/2005
  Q: I was looking for a way to progammitically convert 2004 .dwg files to 2000 .dwg files. We recieve ...
  A: Should be pretty trivial, the way I'd do it is with my runbatch routine that I provide for free when ...
Open URL Customise2/11/2005
  Q: In AutoCAD 2004 when opening hyperlinks you need select the item > Right Click > select Hyperlink ...
  A: you can start a browser with the BROWSER command. you should also be able to do something like: ...
attribute references highlight2/1/2005
  Q: Would you please tell me is it possible to highlight an attribute (not attribute definition) ...
  A: yes it is, and where you are getting misled here is using the vlx- and vlax functions. it's not ...
DCL problem1/22/2005
  Q: Scott, I use AutoCAD 2004 and have a problem in dcl programming, especally in the lisp coding ...
  A: There's probably half-a-dozen ways to solve this problem, all dealing with coding style and ways to ...
AutoLisp1/13/2005
  Q: I am using AutoCAD 2002 on WIn XP Pro. Networked with a server. I am writing a lisp routine and need ...
  A: You will need to use SSGET "X" with a properly formatted argument list. Look at the lisp function ...
text1/5/2005
  Q: Just looking for a quick text enhancment. Have been using autoCAD for over 15 years now and usually ...
  A: yes, I used to have a lisp routine that did that - I don't know what happened to it, but I know it ...
Autolisp - Copyclip12/13/2004
  Q: i'm trying to write a simple lisp routine to calculate slope & deviation in my flow line elevation ...
  A: there's no built-in lisp function to do that, although it's probably possible through the activex ...
Electrical panel Bill of Materials11/1/2004
  Q: I work for an electrical eng. firm and I'm trying to find a quick way to make a BOM from an Autocad ...
  A: you can use the attext command to get the info out to the file. there are other free and express ...
Changing the default printer on multiple files10/29/2004
  Q: We have thousands of drawing files on our server, produced by different people using various ...
  A: I have a product called plot2000 that you can try. It's $49.95/ station, and there is a free 30-day ...
LISP ROUTINE9/15/2004
  Q: I am looking for a lisp routine that will trim a line on a 2D drawing when I insert a block. this ...
  A: That's sort of a complex question. I have something that will do that, but it's designed to work as ...
Rotate3D command in lisp file8/5/2004
  Q: I am trying to use the command rotate3d in a lisp file but i keep getting an error message that says ...
  A: you can't call a lisp C: function with the command function. You can call them like this: ...
AutoLisp6/28/2004
  Q: I am currently using Acad r14 and am mostly self taught. Where can I get books on AutoLisp for ...
  A: powell's technical bookstore at http://www.powells.com/technicalbooks is a huge resource for ...
FIND text in XREF drawings! Possible?4/23/2004
  Q: I use AutoCAD 2002 on Windows 2000 and I need to built a LISP routine to perform a "FIND" command ...
  A: I'm not even sure this can be done without spending an hour or so looking into it. There is a ...
Programming Zoom Commands for a 5 Button Mouse4/12/2004
  Q: I recently got a new computer with XP on it. I am having trouble reprogramming my mouse to do zoom ...
  A: find the ***buttons section in your acad.mns file and experiment with it to figure out which line is ...
Exporting button creations2/9/2004
  Q: Is there an efficient way to save all the button settings (and Images)as I like to arange them ...
  A: you have to save the images to individual .bmp files. keep these images in a directory on the ...
line tangent to a point and a 3D question2/6/2004
  Q: Aloha, I have two questions: 1. How do you get AutoCad to draw a line tangent to a SPECIFIC point in ...
  A: 1. Tangent is an angle 90 degrees off of the angle between the centerpoint of the circle and the ...
Lisp - osnap11/10/2003
  Q: I'm having problems with osnap. In my lisp script i would like to turn the osnap off and then turn ...
  A: this is done by saving the value of osmode at the beginning of your routine and restoring it at the ...
Lisp problems10/28/2003
  Q: I am using AutoCad 2002. I am creating a lisp routine that will create a tendon for a pt slab. I am ...
  A: sounds like you have a running osnap turned on and you are snapping to points when you are creating ...
stationing5/27/2003
  Q: ***** Scott Cook Answers - yes there is a way to do this. how far along are you with the project? ...
  A: my routine used measure. the measure command puts the blocks it adds to the previous selection set, ...

All Questions in This Category

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.