pBe Posted March 27, 2011 Posted March 27, 2011 And Second question is how to change that lisp below to have prefixed number... prefixed number or prefixed value? Not exclusive to numbers? (setq [b]pr_num (getstring "\nEnter Prefix: " T)[/b] num (getint "\nEnter an initial number: ")) and (command "._leader" pt pause "" [b](strcat pr_num[/b] (itoa num)[b])[/b] "") Quote
Lee Mac Posted March 27, 2011 Author Posted March 27, 2011 I 've got one problem so far with NumInc lisp. When I copy and paste a number, it doesn't paste right near the cursor but far far away. What do you mean when you say 'copy and paste a number' - is this using my program? Regards, Lee Quote
warcrack Posted June 7, 2011 Posted June 7, 2011 Hi,folks.Got fatal error with load the numinc.Please help. Used Autocad 2012 Full Quote
Lee Mac Posted June 7, 2011 Author Posted June 7, 2011 Hi Warcrack, What was the error message? Quote
Lee Mac Posted October 6, 2011 Author Posted October 6, 2011 A little preview of something I've been occasionally working on... Finally got the dialog looking how I want it Quote
Prophecy99 Posted October 6, 2011 Posted October 6, 2011 I am not sure if you take requests, but I love your NumInc lisp. My only request is to have more border options. Like maybe a Elevation Tag (Text enclosed in a rectangle with an arrow ) . either way thanks for sharing its awesome. Quote
Lee Mac Posted October 6, 2011 Author Posted October 6, 2011 I am not sure if you take requests, but I love your NumInc lisp. Thanks Prophecy! Certainly, I welcome any and all suggestions - I obviously can't guarantee that all ideas will be incorporated into the program, but I try to satisfy most of them. My only request is to have more border options. Like maybe a Elevation Tag (Text enclosed in a rectangle with an arrow ) . either way thanks for sharing its awesome. I'm trying to keep the borders as generic as possible to benefit the most users but hopefully the new option to use an attributed block will satisfy this request, since any conceivable shape could be used. Cheers! Lee Quote
Prophecy99 Posted October 6, 2011 Posted October 6, 2011 I can't tell you how much time your lisp has saved. So your very welcome. Its probably alot of complications, but maybe custom borders loaded from the end user are a potential idea. Quote
Lee Mac Posted October 6, 2011 Author Posted October 6, 2011 I can't tell you how much time your lisp has saved. So your very welcome. Thanks, glad to hear it Its probably alot of complications, but maybe custom borders loaded from the end user are a potential idea. I think attributed blocks are the way to go with this one; if I tried to create the functionality to 'load' custom borders which could be constructed from any AutoCAD entities and be of any shape, I would be effectively reinventing the existing functionality that is available with an attributed block. But I thank you for the suggestion all the same. Quote
Vidiot Posted October 6, 2011 Posted October 6, 2011 This is a great program! Keep up the good work. Quote
Lee Mac Posted October 6, 2011 Author Posted October 6, 2011 This is a great program! Keep up the good work. Cheers Vidiot! It has been an enjoyable program to write, so I am glad you like using it too Quote
Lee Mac Posted October 10, 2011 Author Posted October 10, 2011 Incremental Numbering Suite Version 3.0 released. The program is now faster & smoother and has become my largest and most developed application, with many new features and updates included in the new version, a handful of which I have listed below. I have also completely rewritten the program description to give a more complete overview of the program capabilities. Program completely rewritten to improve program performance, update code formatting to improve readability and include the following new features: Ability to use Text, MText or an arbitrary Attributed Block to house incrementing string. Ability to change Text / MText Alignment. Ability to toggle the use of a Background Mask with MText. Ability to specify and pick both dimensions for the fixed size Slot / Rectangular border. Vastly improved alphabetical text incrementing. Improved handling of negative numbers with decimals or leading zeros. Dialog interface completely redesigned to make it more user-friendly and intuitive to navigate. Immensely improved non-dynamic mode interface & functionality. Program works in all UCS/Views correctly. Since the entire program has been rewritten there are likely to be some bugs lurking in the code, so I challenge you to find them! Quote
Organic Posted October 11, 2011 Posted October 11, 2011 That is a great improvement. I don't use this lisp often, although when I have previously it has saved a lot of time. With the mtext background mask, is there anyway to change it from a default border value of 1.5 to something user defined? Quote
Assgarth Posted October 11, 2011 Posted October 11, 2011 Hi Lee I have a small suggestion to make counting the Roman numerals. Below are a few functions, that may help. ;; ======================================================================================== ;; ;; ================================== ROMAN NUMBERS ======================================= ;; ;; ======================================================================================== ;; ;;--------------------------------=={ zk:Inc_Roman }==--------------------------------------;; ;; increment / decrement roman numbers ;; ;;------------------------------------------------------------------------------------------;; ;; Act [sYM] - [+/-] - addition / substraction ;; ;; Nbr [sTR] - roman number ex. "MMCVI" ;; ;; Inc [iNT] - increment value ;; ;;------------------------------------------------------------------------------------------;; ;; Attension: roman numerals haven't zero! If the value of less than "I", it display "0" ;; ;;------------------------------------------------------------------------------------------;; ;; Example [sTR]: (zk:Inc_Roman - "XLV" 23) --> "XXII" ;; ;;------------------------------------------------------------------------------------------;; (defun zk:Inc_Roman (Act Nbr Inc / RET) (if (and Nbr (= (type Nbr) 'STR) (/= Nbr "") (= (type Inc) 'INT) (member Act (list - +)) ) (if (zk:CorrectRoman Nbr) (progn (setq RET (zk:Decimal->Roman (Act (zk:Roman->Decimal Nbr) Inc))) (if (= RET "") "0" RET) ) Nbr ) Nbr ) ) ;;------------------------------=={ zk:Decimal->Roman }==-----------------------------------;; ;; change the numerical value from decimal to roman ;; ;;------------------------------------------------------------------------------------------;; ;; input [iNT] - integer value ;; ;;------------------------------------------------------------------------------------------;; ;; Example [sTR]: (zk:Decimal->Roman 2106) --> "MMCVI" ;; ;;------------------------------------------------------------------------------------------;; (defun zk:Decimal->Roman (input / roman decimal romanvalue i) (setq roman (list "M" "CM" "D" "CD" "C" "XC" "L" "XL" "X" "IX" "V" "IV" "I")) (setq decimal (list 1000 900 500 400 100 90 50 40 10 9 5 4 1)) (setq romanvalue "" i 0) (while (< i 13) (while (>= input (nth i decimal)) (setq input (- input (nth i decimal))) (setq romanvalue (strcat romanvalue (nth i roman))) ) (setq i (1+ i)) ) romanvalue ) ;;------------------------------=={ zk:Roman->Decimal }==-----------------------------------;; ;; change the numerical value from roman to roman decimal ;; ;;------------------------------------------------------------------------------------------;; ;; input [sTR] - roman number as a string ;; ;;------------------------------------------------------------------------------------------;; ;; Example [iNT]: (zk:Roman->Decimal "MMCVI") --> 2106 ;; ;;------------------------------------------------------------------------------------------;; (defun zk:Roman->Decimal (input / roman decimal decimalvalue i) (setq roman (list "M" "CM" "D" "CD" "C" "XC" "L" "XL" "X" "IX" "V" "IV" "I")) (setq decimal (list 1000 900 500 400 100 90 50 40 10 9 5 4 1)) (setq decimalvalue 0 i 0) (while (< i 13) (while (equal (vl-string-search (nth i roman) input 0) 0) (setq decimalvalue (+ decimalvalue (nth i decimal))) (setq input (substr input (1+ (strlen (nth i roman))))) ) (setq i (1+ i)) ) decimalvalue ) ;;--------------------------------=={ zk:CorrectRoman }==-----------------------------------;; ;; validation roman number ;; ;;------------------------------------------------------------------------------------------;; ;; Val [sTR] - roman number as a string ;; ;;------------------------------------------------------------------------------------------;; (defun zk:CorrectRoman (Val) (and (= (type Val) 'STR) (equal (zk:Decimal->Roman (zk:Roman->Decimal (strcase Val))) (strcase Val) ) ) ) greets Quote
Lee Mac Posted October 11, 2011 Author Posted October 11, 2011 That is a great improvement. I don't use this lisp often, although when I have previously it has saved a lot of time. Thanks Dink With the mtext background mask, is there anyway to change it from a default border value of 1.5 to something user defined? This is certainly possible, the only problem is finding a location for the controls on the dialog interface - it's pretty congested at it is... I shall keep it in mind for the next version though, should I start work on the program again. I have a small suggestion to make counting the Roman numerals. Thanks for your suggestion Assgarth, I shall keep it in mind for the next version Quote
Lee Mac Posted October 11, 2011 Author Posted October 11, 2011 I have updated this program to Version 3.1 This fixes a bug concerning a null variable when the Text Style is set to an Annotative Text Style and the object type is set to use an Attributed Block. Lee Quote
Lee Mac Posted October 12, 2011 Author Posted October 12, 2011 Dear Sir, Nice lisp thx for sharing Thanks autolisp, enjoy Quote
BIIST Posted October 12, 2011 Posted October 12, 2011 An another excellent script Lee Mac keep up the good work Quote
Lee Mac Posted October 12, 2011 Author Posted October 12, 2011 An another excellent script Lee Mackeep up the good work Many thanks BIIST, its just a shame that it doesn't quite fit your requirements 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.