SLW210 Posted 22 hours ago Posted 22 hours ago As I state in the header, I found the AutoCAD dimension "MARK" to be less than useful, so over the years I have used my own, eventually writing some LISP, as well as having found the mentioned LISP by alanjt. I really don't care for mucking around with the new CENTERMARK either. Thought I might as well share it, some may find it handy. ;;; Replace Diameter/Radius dimension CenterMarks with two CENTER2 linetype lines. ;;; ;;; https://www.cadtutor.net/forum/topic/99350-center-mark-replacement/#findComment-680408 ;;; ;;; By SLW210 (a.k.a. Steve Wilson) ;;; ;;;| Since AutoCAD in there infinite wisdom makes the default dimdia and dimrad center marks useless by not allowing them to be associated by other dimensions and not allowing an individual color and linetype I came up with this little routine. Much faster, it was using some commands, I went to removing commands. I used to get rid of the default the drew a centermark and copied from center to center, a bit tedious at best. I started with this from Alan J Thompson, so thanks to him. ================================================================ Turn off the centermark for diameter and radius dimensions https://www.cadtutor.net/forum/topic/18792-request-routint-to-turn-off-center-mark-for-single-entity/#findComment-153451 By alanjt|; ;;; ;;; ================================================================ ;;; ================================================================ ;;; CtrMrkRep.lsp ;;; ;;; Replace Diameter/Radius dimension center marks with ;;; two CENTER2 linetype lines. ;;; ;;; ;;; AutoCAD 2018-2026 should work as well as BricsCAD and others. ;;; ;;; ================================================================ ;;; ================================================================ ;;; Original dimensions are retained. ;;; ;;; Replacement geometry: ;;; Layer : CenterMark ;;; Color : ByLayer ;;; Linetype : ByLayer ;;; Layer Color : ACI 5 (Blue) ;;; Layer Linetype : CENTER2 ;;; ;;; Modes: ;;; Select - manually selected DIMDIAMETER/DIMRADIUS ;;; Current - all such dimensions in current Model/Layout space ;;; All - all such dimensions in all paperspace layouts ;;; ;;; Associated dimension center marks: ;;; Disabled using ActiveX acCenterNone. ;;; ;;; Duplicate centers: ;;; Only one centerline cross is created for each unique center ;;; within each Model/Layout space. ;;; ================================================================ CtrMrkRep.lsp 1 Quote
Paul Li Posted 21 hours ago Posted 21 hours ago When you mention dimension mark I assume you’re referring to AutoCADs original DIMCENTER command which I agree is quite useless. But I do think the number of commands beginning with the word center introduced back in 2017 were a lot more useful since finally the “marks” can now be made associatively to the objects selected. 1 Quote
SLW210 Posted 19 hours ago Author Posted 19 hours ago I tried and tried to get the new Centermark to work nicely out of the box, too hard to get the proper size for starters and just do not care for it for a replacement for the DIMCENTER, the simple Lines work a lot better and allow you to snap associative dimensions so if something changes the center to center and center to end remain correct. Quote
pkenewell Posted 17 hours ago Posted 17 hours ago Have you tried: https://www.lee-mac.com/associativecenterlines.html ? 1 1 Quote
SLW210 Posted 15 hours ago Author Posted 15 hours ago 1 hour ago, pkenewell said: Have you tried: https://www.lee-mac.com/associativecenterlines.html ? I know of that one, but my LISP replaces the centermarks for dimdiameter and dimradius, by selection, by current or all. I could possibly add reactors to mine, not sure it's necessary. 1 Quote
pkenewell Posted 15 hours ago Posted 15 hours ago 21 minutes ago, SLW210 said: I know of that one, but my LISP replaces the centermarks for dimdiameter and dimradius, by selection, by current or all. I could possibly add reactors to mine, not sure it's necessary. Sure, I know what you mean. I have my own routine i spun years ago that i still use. i use a linetype scale ratio to keep the center with a single set of gaps and centermark. Although it's not perfect, it's good enough for me. 1 Quote
mhupp Posted 7 hours ago Posted 7 hours ago Def going to use some coding from this. Thought id share a few different options that i came up with over the years. check error message agaist a list (if (not (member msg '("Console Break" "Function cancelled" "quit / exit abort"))) (princ (strcat "\nError: " msg)) ) using cond inside setq for default option. (initget "Select Current All") (setq mode (cond ((getkword "\nMode [<Select>/Current/All]: ")) ("Select") ) ) 2 Quote
SLW210 Posted 50 minutes ago Author Posted 50 minutes ago 14 hours ago, pkenewell said: Sure, I know what you mean. I have my own routine i spun years ago that i still use. i use a linetype scale ratio to keep the center with a single set of gaps and centermark. Although it's not perfect, it's good enough for me. I thought about doing that as well, I may still do it. 7 hours ago, mhupp said: Def going to use some coding from this. Thought id share a few different options that i came up with over the years. check error message agaist a list (if (not (member msg '("Console Break" "Function cancelled" "quit / exit abort"))) (princ (strcat "\nError: " msg)) ) using cond inside setq for default option. (initget "Select Current All") (setq mode (cond ((getkword "\nMode [<Select>/Current/All]: ")) ("Select") ) ) That looks good. My AutoCAD has been freezing/crashing randomly since they updated my work computer to Windows 11 among other issues, no LISP related issues, just random, often when opening a new drawing or switching drawings occasionally during a command. So I have been going through my old LISPs, etc. and trying to clean them up, add and improve options, test them, etc., as I can and/or as I get to them. Mostly so I can quickly adjust, alter, and improve the drawings as quickly as possible before a crash/freeze. Any suggestions, corrections and/or criticisms, etc. are fine, I will slowly post a few I am happy with as I get them cleaned up. As some may have noticed, I sometimes add a comment in the code where to change some hard coded options, I might or someone else can feel free to add a DCL or options on the commandline. There is always @BIGAL's Multievals, etc. if someone newer to LISP wants to add options, I am sure he will help someone out it getting that done. P.S. Most of my posted on the internet code has a header of some sorts, that's generally for some instructions and usually I place a link to where I posted the code as well as my name, etc. That's mostly for my benefit, I would love to see at least the link to where I posted it (particularly if it was in response to another's request), but feel free to "steal" what you like, with no worries, nor do I need credit. On that issue, the header I posted in my first post, I did add some credit for what I knew I had borrowed, it's in the actual LISP file, too. So please leave those in out of respect. If anyone notices anything else I need to credit, please mention it. P.S.S. You may notice I have a description as a first line, I do that for use in an old LISP from CADALYST site that loads a list of LISPs from a specified folder and shows the name and description, but the description has to be the first line. ;;;CADALYST 11/04 Tip1996: LoadLsp.lsp LISP Manager (c) 2004 Jeffery P. Sanders ;;;--- LoadLsp.lsp - Displays lisp programs with a description. ;;; ;;; ;;;--- For AutoCAD Release 2000+ ;;; ;;; ;;;--- Created on 9/2/04 Revision 0 ;;; ;;; ;;;--- Copyright 2004 by JefferyPSanders.com ;;; All rights reserved. It also has some other LISPs and DCL required. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.