Jump to content

Recommended Posts

Posted (edited)

Hi Guys,

 

Wasn't that busy, so I thought I'd put together a little Incremental Numbering Suite for you all to sample.

 

I've come to realise that this kind of LISP seems to be quite a popular one in many trades, and this was my main inspiration for its creation.

 

As with all my programs - your comments and/or criticism is welcome, as this only helps to improve the program itself.

 

Thanks & Enjoy!

 

Cheers

 

Lee

 

 

Incremental Numbering Suite

 

Main Dialog Preview:

 

NumIncV3-3.png

About Dialog Preview:

 

NumIncV3-3A.png

 

Incrementing two sections of Text with a Background Mask and Rectangular Border:

 

NumInc0.gif

Incrementing with Leading Zeros:

 

NumInc1.gif

 

Text with a Slot Border:

 

NumInc2.gif

Placing text in a Table Cell:

 

NumInc3.gif

 

Incrementing Text with Leading Zeros and Hexagonal Border:

 

NumInc4.gif

 

Incrementing alpha text, demonstrating rotation of Triangular Border:

 

NumInc5.gif

 

Curve-Aligned Mode:

 

NumIncC.gif

Array Example 1

 

Demonstrating the difference between Spacing Vector and Endpoint specification, with Object Rotation set to 'Aligned'.

 

NumIncA1.gif

Array Example 2

 

Demonstrating Perpendicular rotation and a fixed zero rotation.

 

NumIncA2.gif

 

A full description of the program and the latest version can be found here.

NumIncV3-9.zip

Edited by Lee Mac
  • Replies 299
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    149

  • alanjt

    10

  • The Buzzard

    10

  • mdbdesign

    7

Top Posters In This Topic

Posted Images

Posted

Now that's sweet, Lee.

I made that change you made for me in a previous version to allow a leading zero in the number, and the rotation ability you put in the program really adds to the utility of it.

But then a small thought came into my head:

What if we need the prefix and the number to be static, and the suffix to increment? Only the prefix and suffix accept alpha input, but neither of these will increment.

 

 

Steve

Posted

Thanks for your suggestions Steve :)

 

I suppose I could include options for an incrementing Prefix and/or Suffix, but this would add extra prompts for the user. I shall have a think about this one :thumbsup:

Posted

Yep. Too many user prompts would make it a real endurance test, and might possibly turn many potential users away from it.

It's very good as is. I was just tossing out some thoughts.

 

Steve

Posted
Yep. Too many user prompts would make it a real endurance test, and might possibly turn many potential users away from it.

It's very good as is. I was just tossing out some thoughts.

 

Steve

 

As I said, I like the comments and criticism, (after all, it can only potentially make it better... :P ) and, if I think this is feasible without too much clutter, I may well incorporate it :)

 

Thanks Steve

Posted

Purhaps a "kword" system, i find that is quite helpfull, when trying to steam line a program, or even a kword toggle.

Posted

Hey, great routine. This will certainly speed up the creation of “Part Callout” drawings.

 

The only thing I would suggest is coordinate translation to eliminate the need to have the WCS current.

Posted
Hey, great routine. This will certainly speed up the creation of “Part Callout” drawings.

 

The only thing I would suggest is coordinate translation to eliminate the need to have the WCS current.

 

Ahh good point Sean, thanks :)

 

I shall endeavour to incorporate that. I only tested it in WCS, so didn't notice the need, but thanks for pointing that out mate :)

Posted
Purhaps a "kword" system, i find that is quite helpfull, when trying to steam line a program, or even a kword toggle.

 

Thanks Flowerrobot for your suggestion - I just like to keep the user prompts to a minimum, otherwise the user just sloggs through a load of prompts before he/she can get to the "business" end of the program...

Posted

What if I need to get one sets of number without prefix or suffix?

Another thing: What about dcl? Is it pending?

Posted
What if I need to get one sets of number without prefix or suffix?

 

Well, at the minute, I suppose you could use a space for a prefix and suffix - but yes, I shall incorporate the option of none.

 

Another thing: What about dcl? Is it pending?

 

Hmmm... I'm not sure about DCL, I may just keep it command line - with DCL, you have the complications of an extra file, and the coding turns "ugly"...

 

 

But thanks for the suggestions :)

Posted

Here is one way to deal with options:

(defun c:test()
 (setq snum 1
       inc  1
       pre  ""
       suf  ""
       )
 ;;  enter key sends the user on his way
 (while
   (cond
     ((progn
        (princ (strcat "\n*** Start #" (rtos snum 2 0)
                       "  Increment: " (rtos inc 2 0)
                       "  Prefix: " pre
                       "  Suffix: " suf))
        (initget "Start Inc Prefix sUffix")
        (null (setq opt (getkword "\nEnter option to change [start/Inc/Prefix/sUffix]: "))))
        nil
     )
     ((= opt "Start")
      (setq snum (getreal (strcat "\nSpecify Starting Number <" (rtos snum 2 0) ">: ")))
     )
     ((= opt "Inc")
      (setq inc (getreal (strcat "\nSpecify Increment <" (rtos inc 2 0) ">: ")))
     )
     ((= opt "Prefix")
      (setq pre (getstring t (strcat "\nSpecify Prefix <"
                                      (if (eq "" pre) "-None-" pre) ">: ")))
     )
     ((= opt "sUffix")
      (setq suf (getstring t (strcat "\nSpecify Suffix <"
                                      (if (eq "" suf) "-None-" suf) ">: ")))
     )
   )
  )
 (princ)
)

Posted

Thanks for the info CAB, I'll be sure to test that tomorrow when I get a minute :)

 

 

Cheers

 

Lee

Posted

This is a preliminary - I am thinking DCL may be a good call - but not sure...

 

Let me know of your thoughts on this:

 

Posted

Lee,

 

You should know by now.

DCL is always a good call.

 

The whole program in your face without anticipation of prompts.

Posted

Now thats more like it.

Outstanding work Lee.

Posted

Very nice, Lee.

 

You know what would make a program like this truly powerful? In addition the current option which creates new text, an option to edit existing text (or attributes).

Posted

Also for some reason the text angle changes in the middle of executing the program... :confused:

Posted

Lee,

 

One thing I noticed was you cannot have preceeding zero's in the suffix.

 

(Example: To have a suffix start at 001 and increment it.)

 

The program does not put the zero's in except for the one you put in the dialog.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...