Jump to content

All Activity

This stream auto-updates

  1. Yesterday
  2. BIGAL

    CUI Input Text Field?

    if you want a radio button pick have a look at my Multi radio buttons.lsp it can hold about 20 values vertically. once you pick I use Ldata to save the value in a dwg, in the multi R you can set the button to the current value. In a pop menu would be just a load a lisp as normal all the values being in it that lisp.
  3. BIGAL

    Structural drafting tools

    @masterfal one of the answers you are looking for is Strucplus, it is an Aus product just like me. Its been around for like 40 years has lots of good steel connection drafting tools. I have a manual & code but its back in that era and I am sure it has been improved over time, has concrete as well. I have some concrete slab on ground stuff. Draw beams, Waffle slabs, etc. Did some stuff at one stage for tilt panels. I used to have choose concrete beam types and matching blocks, these were chosen via pop image menu's. As suggested there is a lot of stuff out there just have to find it. Did you google "reinforced concrete beams Autocad lisp". Send me a PM with your email and can talk more Aussie time. I am near Newcastle.
  4. Saxlle

    CUI Input Text Field?

    Hi @CivilTechSource, Here is the an example how you can do it on different approach. In AutoCAD exist "blackboard", where you can store the desired value where you can than use that value in the other open drawings (more about blackboard: About Sharing Data Between Namespaces (AutoLISP)). In this example, I have a "text size values.txt" file with different heights. It can be update with other height values. 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0 So, after run this function, you will first choose the file with values (in this case "text size values.txt"), than pick the desired value and add it to blackboard. (prompt "\nCall function: (getValueFromListBlackboard)") (princ) ;; Add any value from list to the "blackboard" (defun getValueFromListBlackboard ( / *dcl_id* *file_name* *op* *lst* *textSize* *path* *file* *line* *rval*) (setq *path* (getfiled "Open the txt file with list of values"" "txt" 0) *file* (open *path* "r") ) (if *file* (progn (while (setq *line* (read-line *file*)) (setq *lst* (append *lst* (list *line*))) ) (close *file*) ) ) (setq *file_name* (vl-filename-mktemp "textHeight.dcl") *op* (open *file_name* "w") ) (write-line "textHeight :dialog { label = \"Select Text Heights\"; :list_box { key = \"tx\"; multiple_select = true; height = 20; width = 30; } :row { :button { label = \"Pick text height\"; key = \"bth\"; fixed_width = true; } :button { label = \"Cancel\"; key = \"cancel\"; mnemonic = \"C\"; alignment = centered; fixed_width = true; is_cancel=true; } } }" *op*) (close *op*) (setq *dcl_id* (load_dialog *file_name*)) (if (not (new_dialog "textHeight" *dcl_id*)) (exit) ) (action_tile "cancel" "(done_dialog 0)") (start_list "tx") (mapcar 'add_list *lst*) (end_list) (defun return_value () (setq *rval* (nth (atoi (get_tile "tx")) *lst*)) ) (action_tile "bth" "(return_value) (done_dialog 1)") (start_dialog) (unload_dialog *dcl_id*) (vl-file-delete *file_name*) (vl-bb-set '*textSize* *rval*) (vl-bb-ref '*textSize*) ) After you pick the desire height, you can change it in all open drawings for any text. In this case, I made a little lisp for that and I need it to call every time in different drawing (except if you don't want to make it in support file search path or to be autoloaded every time when AutoCAD is started). (defun c:CTH ( / data) (setq data (entget (car (entsel "\nSelect the text:")))) (entmod (subst (cons 40 (atof (vl-bb-ref '*textSize*))) (assoc 40 data) data)) ) An example video of how it works you can see below. ChangeTextWithValueFromBlackboard.mp4 Maybe in this you can get some idea how to make it work in your case. Also, you can add "getValueFromListBlackboard" to CUI and make it easier to call. Best regards.
  5. I had partially worked out at one time, at least enough to get the vertices, with Owen Wengerd’s acis-decode function for lisp. Just filter ("point" "$-1" "-1" "$-1" "100" "100" "0" "#") -> ("point" "100" "100" "0") -> -(100.0 100.0 0.0) Ideally, it would be better to filter out the edges, so you know what point connects to what. I think each $INT represents a line number example, the first face points to the next face on line 6...
  6. Thanks Daniel, that does look like a convenient way to do it. I don't know how to use the ARX stuff though, never got into that. Too bad there isn't a AssocPersSubentIdPE function in lisp!
  7. CivilTechSource

    Structural drafting tools

    Have you tried checking the AutoDesk App store? I do recall seeing a rebar drafting plugin.
  8. Hi All, I currently do structural drafting (mainly residential) and have been doing that for quite a number of years now and in that time i have noticed that there are not a great deal of tools available - built into autocad or otherwise. they have stuff for mechanical, architectural, electrical, plumbing etc but doesn't seem to be much for structural. would be cool if there was stuff to help with drawing footings or reinforcement in slabs or stuff to help with detailing. Anyway i was just wondering if anyone had anything specifically useful for structural drafting that they use that they would be happy to share? Something i use all the time is this steel lisp routine (attached) which includes all the common steel member sizes used in australia which you can add in cross section view, top view or side view. Would be good if could add t-bars in there somehow too. had little look but couldn't work out exactly how to do it. i can edit the shapes that are currently in place but not sure how to add in new shapes and sizes.. edit - with this stl routine it was originally set up to also load a US version of the member sizes but i've tweaked it so STL only opens the aus version as i have no need for US sizes. i think the info for the US sizes are still there so if you want those you will need to amend the routine slightly Stl.zip
  9. Last week
  10. BIGAL

    LISP Command names and shortcuts

    You dont need to load all the lisps, if you use say a custom lisp and auto load it, inside you have all your Le lisps set via AUTOLOAD so when you type the command it loads the correct lisp. I have like 15 of them. Type "zzz" etc (autoload "COPY0" '("COPY0")) (autoload "COPYCOMMAND" '("ZZZ")) (autoload "COVER" '("COVER")) (autoload "DIMFLIP" '("DIMFLIP")) (autoload "DRAWXFALL" '("DRAWXFALL")) (autoload "DRAWPIPE" '("DRAWPIPE"))
  11. Can the code not depend on the values of "LISPSYS" (0, 1, 2)?
  12. Not in my experience, but it's possible.
  13. That's a point - forget what I said.
  14. But after changing LISPSYS, the code only worked after restarting Autocad... So it's impossible to configure it in the code?
  15. If you want you can do something like (setq LispSys_Old (getvar 'lispsys)) (setvar 'lispsys 0) ... do your code here (setvar 'lispsys LispSys_Old) to set it and reset it to what it was if you are worried about the change affecting other things. I would normally set a variable and return it to what it was with the least code in between in case the LISP is interrupted or to put in error handling to return it to its original value
  16. After changing the variable LISPSYS=0, you need to restart Autocad. The code UNFORMAT worked perfectly! Thanks! Won't this affect the work of other lisp programs ?
  17. Try setting LISPSYS=0 if you haven't already.
  18. Yes, both versions are on the same computer. And before that, everything worked in autocad 2015. That's why I'm at a loss. Thank you very much.
  19. It's simply that your version of LM:UnFormat (I don't know if it's the original or modified one) isn't compatible with some localized versions of AutoCAD. Is your version of AutoCAD 2019 on the same PC as the 2021 version?
  20. GRABTEXTS Writing on the command line: (1 . ) (1 . )
  21. No, I didn't understand why the first code didn't work.
  22. Maybe you deleted some parentheses when you removed the T argument.
  23. ((= otyp "MTEXT")(print (vla-get-TextString obj))(vla-put-TextString obj (supriFMT (vla-get-TextString obj)))) ; AcDbMText It looks like it worked! Thank you all! I'll test it again. But I still haven't figured out what the problem is...
  24. ((= otyp "MTEXT")(print (vla-get-TextString obj))(vla-put-TextString obj (supriFMT (vla-get-TextString obj)))) ; AcDbMText It looks like it worked! Thank you all! I'll test it again.
  25. I'll put this one here for later. I have a suspicion that the text is still there, just not visible - very small perhaps. This will show all the mtext values (first 256 characters anyway) in the drawing. Run it after your unformat just to confirm that the texts have been deleted or are just not visible. (defun c:GrabTexts ( / MySS acount MyEnt) (setq myss (ssget "_X" '((0 . "mtext")))) (setq acount 0) (while (< acount (sslength myss)) (setq Myent (ssname Myss acount)) (princ "\n")(princ (assoc 1 (entget MyEnt))) (setq acount (+ acount 1)) ) ; end while )
  26. Write before (vla-put-textstring obj (vla-get-TextString obj)) this: (print (vla-get-TextString obj)), load it, run it and share a screenshot of what happened on the command line PS: Also make sure you've closed all the parentheses in your Lisp expression: your last message seems to be missing a closing parenthesis.
  27. ((= otyp "MTEXT")(vla-put-TextString obj (supriFMT (vla-get-TextString obj)) ; error: incorrectly generated list at the entrance
  1. Load more activity
×
×
  • Create New...