Jump to content

Recommended Posts

Posted

Does anyone have any good ideas when Keynoting up Plans? Currently we have a block with a few common keynotes in it. Then we match the keynote block number with a mleader number.

Are there routines where you can put a master list keynote and you can insert the ones you need?

Posted

It sounds like using a mtext and adding to it updating as required, the only issue is where do you get the keynote from, maybe each is a file keynote1.txt etc then you can read the text from the file. Again pick the leader read the number pick mtext and its added. Have a mtext with 1st line ie KEYNOTES etc.

 

Need more info from you as to a preferred method of what is where. Also sample dwg etc notes etc.

Posted

I think I follow you. It makes sense. How would ordering go? If you have 1 - 10. You need only 2,4,6 and 8 keynotes, would it put it in a 1,2,3, etc?

Posted

That can be done you still need the keynotes somewhere, you would need somehow to pick which keynote to add but it could be labelled any number,

 

Using files is simple and allows changes easily or add more.

 

There are a couple of ways to select the keynote one is to use a pop up dcl list box with a abreviated description, this would work out which full text to use.

 

image.png.95fc9973c3782186ed96a286e1307347.png

Posted

I am definitely curious on how this would works from a back end? So once the lisp routine is setup with the DCL, There would be a folder where these txt files would be stored or is it one txt with all the other keynotes in it? I still understand that with the MLeaders, I would still need to edit the block or call out. but I think it would standardize all the keynote calls rather than having a block with either a bunch or keynotes that you delete or starting off with a basic block with a few keynotes.

Posted (edited)

Using the library list box dcl it allows you to enter the descriptions to be seen and pick one so can be longer than one word. 

 

A couple of ways the list of keynotes is ordered the same as their number 1-x so selecting one returns a picked item number this would be added to file name.

 

Other is a double list (("Trees" "c:\\mystuff\\keynotes\\keynote 7 trees")......)  = (description filename) This is better in that order does not matter.

 

If you post a dwg I am sure some one will do the front end. Only need a couple of keynotes do not have to be real. 

 

What is maximum number of notes.

 

 

Edited by BIGAL
Posted

Here we go, I have attached a example dwg with some of the keynote, typically used.

As for the maximum amount of notes, maybe 30 or so. I would honestly say that it varies.

I sure hope this helps! Thank you once again!

Keynotes.JPG

Keynotes.dwg

Posted

Try this it can have some smarts added to it. Select Exit to stop. You must make the mtext 1st with say "Keynotes" this could be added to code.

 

; https://www.cadtutor.net/forum/topic/70967-keynoting-plans/
; adding keynotes By Alan H Aug 2020

(defun c:keynotes ( / keynotes  x mtxt)
(setq keynotes (list 
(list "Exit" "Exit")
(list "Striping" "STRIPING; (SEE DETAILS)")
(list "Curb" "CURB; (SEE DETAILS)")
(list "Light Asph Pav" "LIGHT ASPHALT PAVEMENT (SEE DETAILS)")
(list "4' wide painted x walk" "4' WIDE PAINTED CROSS WALK (SEE DETAILS)")
(list "5' wide sidewalk" "5' WIDE SIDEWALK; (SEE DETAILS)")
)
)

(defun picknote ( / key )
(setq lst '())
(foreach key keynotes
(setq lst (cons (car key) lst))
)
(setq lst (reverse lst))
(if (not AT:ListSelect)(load "Listselect"))
(setq pointspick (car (AT:ListSelect
    "Keynotes"
    "Select notes"
    10
    10
    "false"
    lst
)))
(if (/= (setq note (cadr (nth (atoi item) keynotes)))"Exit")
(setq note  (strcat "\\P"(rtos x 2 0) "."  "\t" (cadr (nth (atoi item) keynotes))))
)
)

(setq note "")
(command "_.CMLEADERSTYLE" "KEYNOTE CALLOUT")

(setq x (getint "\nEnter start number"))

(setq mtxt (vlax-Ename->Vla-Object  (car (entsel "\Pick mtext"))))
(setq txtstr (vla-get-textstring mtxt))

(picknote)

(while (/= note "Exit")
(princ "\nLeader pick points")
(command "mleader" (getpoint "\pick 1st point then 2nd point") pause (rtos x 2 0))
(vla-put-textstring mtxt (setq txtstr (strcat txtstr note)))
(setq x (+ x 1))
(picknote)
)

)

(c:keynotes)

 

Posted

Thank you for this idea! I loaded the routine in the same drawing that is attached. However, I could be doing something wrong. I get this. Probably doing something not right.

 

Enter start number1
Pick mtext; error: LOAD failed: "Listselect"

I tried to select a MText that only had the text value of "KEYNOTES". Then it errors out with a Listselect. Im sure I did not do the process right!

Posted (edited)

Sorry forgot the library list select I use 1 from Alan Thompson. It just needs to be in the support path to work. Lee-mac has a couple as well very useful.

 

listselect.lsp

Edited by BIGAL
Posted

That is pretty Slick idea. Thank you for sharing that. I'm gonna mess around with this!

Posted (edited)

You can use a file if you want just make it a csv desc,keynote if that makes it easier to amend rather than in code. You use a parse.lsp say by Lee-mac to read the file and make a list. 

 

I did not play with 2 line notes will play a bit. Should be a \\p\t at start of next line. Not working for me not sure why not will play more.

 

 

 

Edited by BIGAL
  • 3 years later...
Posted

BIGAL,

 

Thank you! Your code worked great! I use MLEADERS with blocks at the end. The block is basically just a solid-filled circle with the number in the middle. How could I insert these number blocks automatically next to the corresponding note inside the MTEXT note box? 

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