Jump to content

Vlisp Security and Verification Questions


CADWarrior

Recommended Posts

Some food for thought:

 

(defun LM:Round ( n ) (fix (+ n (if (minusp n) -0.5 0.5))))

(defun LM:Roundto ( n p ) (/ (fix (+ (* n (setq p (expt 10. p))) (if (minusp n) -0.5 0.5))) p))

 

Here was the reason I created Keyword because getkword and initget were not strict enough

 

This seems complicated, why not just:

 

  (initget "aLabama alasKa ariZona aRkansas Back")
 (getkword "\nState Name [aLabama/alasKa/ariZona/aRkansas/Back]: ")

Link to comment
Share on other sites

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • CADWarrior

    6

  • SOliver

    6

  • BlackBox

    4

  • alanjt

    3

 

This seems complicated, why not just:

 

  (initget "aLabama alasKa ariZona aRkansas Back")
 (getkword "\nState Name [aLabama/alasKa/ariZona/aRkansas/Back]: ")

 

Well it works about the same just isnt so strict on the user where they have to put K or Alaska and only K or Alaska to return Alaska. Using this will allow the user to do the following

(keyword 7 (list "Alabama" "Alaska" "Arizona" "Arkansas" "Back") "State Name")

Lk returns Alaska

Alk returns Alaska

Alas returns Alaska

Alaska returns Alaska

Alasa returns Alaska

 

I figured it just allowed for a more friendly and none stringent Matching system and also would tell the user what was wrong. Figured more then 2 possible options to select an Item would be easier. (K and Alaska vs. Lk Alk Alas Alaska and Alasa)

Edited by CADWarrior
Link to comment
Share on other sites

it would take about 7 hours minimum and that utilizing 2 screen and being able to type with one hand so my hand never leaves the mouse

 

Temp thread hijack lol:

 

When it comes to Autocad I've a very dictator'ish approach to they way users, er use Autocad. There are two reasons for this. Firstly (probably only due to my less than awesome eye sight) I hate having the screen clogged up with lots of tool bars. Secondly efficiency in motion is every thing constantly moving the mouse to tool bars to select functions means the mouse spends time away from the view port and more importantly is subject to wasted motion. Granted not everyone is obsessed with remembering lists and strings but having spent a few years watching over a survey team's cad use I found it unbearable watching the superfluous use of tool bars. Which brings me neatly to the comment - assuming it implies that you mostly use the command line the post is one of the most refreshing things I've read about Autocad use.

 

TL;DR If you're implying that you use the console for most activites I salute you.

 

Hehe as an ending note I thought an example of the extremity of keyboard use in my day to day Autocad interactions

Changing view(iterated and not pressed at once)

 

Alt,v,3,(t,b,f,r,l,k,s,e,n,w)

Link to comment
Share on other sites

No prob SOliver on the "Temp thread hijack" yes I never use tool bars but for 1 case. My clients refuse to use paper space so all my drawings are in Model space. would be a waist of time to reformat the drawings to paper space. So I created a printing lisp (the tool bar) what would automatically print to the clicked scale. (12"=12" 6"=12" 3"=12" and so on)

 

clicking a button then pressing enter was better in my opinion then memorizing ~15 different inputs then typing then pressing enter.. enter. as below

(defun c:x ( / )
(print 1)
)
(defun c:y ( / )
(print 2)
)
(defun c:z ( / )
(print 4)
)
and so on

But now you have me thinking. I just found a way to filter through blocks to find attribute values now I should be able to automatically choose the scale factor.

 

But anyhow this thread is becoming off track. Just wanted to thank everyone for their input I appreciate it.

 

Thank you,

 

CADWarrior

Link to comment
Share on other sites

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...