Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/01/2019 in all areas

  1. Take a look here for more information and possible solutions: https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Copy-and-paste-in-AutoCAD-hangs-for-a-long-time-or-fails-to-work.html
    1 point
  2. First, welcome to CadTutor. Although the selection set is a list of sorts, It might be more efficient to convert the Selection Set to a list. Lisp is after all LISt Processing, and has numerous functions for processing lists not immediately available when processing a Selection Set. Add four text items to a new drawing in the following order "a" "test" "of" "text items" Get a selection set of text items (taken from your code) (setq ss (ssget (list '(0 . "TEXT")))) Depending on the method used their order in the selection set will be reverse order of creation when using crossing or window or order selected if picked individually (repeat (setq cnt (sslength ss)) (setq ss_lst (cons (ssname ss (setq cnt (1- cnt))) ss_lst)) );end_repeat will convert the selection set into a list of entity names in the same order as they were in the selection set, by starting at the end and adding each new item to the front of the list. If you the want the text string of each item you can use the mapcar function along with the anonymous lambda function to process your list of entities extracting the text string (setq txt_lst (mapcar '(lambda (x) (cdr (assoc 1 (entget x)))) ss_lst)) Here a new list is constructed by taking every item in order from ss_lst and feeding it to the lambda where the item becomes x This text list (txt_lst) will be in the same order as the entity list (ss_lst) If you want to find the location of a specific text string you can use one of the visual lisp functions vl-position (setq find "of") (setq pos (vl-position find txt_lst)) This assigns to the variable pos the zero based index number of "of" in the list. If you then want the entity name of the text "of" it can be obtained using the nth function (setq ent (nth pos ss_lst)) If you want to remove and item from a list (setq txt_lst (vl-remove-if '(lambda (x) (= (nth pos txt_lst) x)) txt_lst)) ;;or (setq ss_lst (vl-remove-if '(lambda (x) (= (nth pos ss_lst) x)) ss_lst)) ;;if you want to delete the entity do it before removing it from the list ;;or store it in another list of items to be deleted later (entdel (nth pos ss_lst)) (setq ss_lst (vl-remove-if '(lambda (x) (= (nth pos ss_lst) x)) ss_lst)) (setq delete_lst (cons (nth pos ss_lst) delete_lst)) (setq ss_lst (vl-remove-if '(lambda (x) (= (nth pos ss_lst) x)) ss_lst)) ;;then later (foreach itm delete_lst (entdel itm))
    1 point
  3. Yes, it fixes the problem for me, when it occurs. But like I said, it only happens every once in a while. It sounds like your issue is more frequent? Try running an AUDIT next time this happens and see if it helps.
    1 point
  4. If you pay some one you will get everything you want, how many posts are you out to now trying to do civil engineering functions like surface models, road cross and long sections what is next where is designing a road vertical curves. Troll the internet it is out there or buy a commercial package there is other than CIV3D and a lot cheaper. Go to Autodesk Apps and have a look.
    1 point
  5. As a surveyor you may have rules about what font to use I know that here in AUS stuff like how a 4 looks, degree symbol, decimal point, are a couple that will reject a plan at the surveyors board, so find a TTF that reflects the standard required as close as you can get.
    1 point
×
×
  • Create New...