Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. mhupp

    Room dimension lisp

    And easy midpoint of two points add them up and divide x y and z by 2 (setq mpt (mapcar '/ (mapcar '+ pt1 pt2) '(2 2 2)))
  4. Thank you very much! I'm making some headway into this problem now. Couldn't find vla-put-textstring in my reference material, and that's very much useful here! Going to keep reading into entmod and things of that nature to try and get more comfortable with messing with the DB to go along with Steven P's suggestion. You all never disappoint
  5. If you just want to put something in text or mtext, case1. your text is object (vla-put-textstring your_text_obj your_text_string) case2. your text is ename (vla-put-textstring (vlax-ename->vla-object your_text_ename) your_text_string) The link is the code I recently used vla-put-textstring. This is the code to paste the text copied to the clipboard into the existed text in drawing. maybe this code has little relevance, but there is how to put something in the text
  6. ronjonp

    Room dimension lisp

    @Steven P You can also subtract the X's and the Y's to get W and H. (and (setq p1 (getpoint)) (setq p2 (getcorner p1)) (setq r (mapcar 'abs (mapcar '- p1 p2))) (mapcar 'print r) )
  7. Precisely .. quick example for OP: (if (setq e (car (nentsel))) (progn (vla-put-color (vlax-ename->vla-object e) 3) (command "_.regen")) )
  8. Howdy @mhupp, thanks for taking some time to respond. I'm essentially taking a file index template and comparing it against a project folder which can have anywhere from ~6-17 drawings. So I'm iterating through the dwg files in the folder to check what files are actually present or not. Then for what's not there, I want to delete the portions of the text contained within the mtext object that mention the drawings that are not present. Though all that is "done" (at least in memory) I've just been struggling getting the new stuff into the mtext object. I feel like I'm probably diving a bit too deep into all this for having around a month of LISP programming (and dare I say only a month of coding experience in general xD) Sink or swim time baby! And yeah, I do apologize about not posting code, but there's semi-sensitive info there
  9. Love it when a small hint sets you on your way again, if you need anything more just shout out.
  10. Some times i tend to over think things playing devil's advocate here asking a stupid question. But why are you comparing it against another string that exists in a variable and not just overwrite it with the variable string cutting out the middle man? like exceed said a example drawing or code would help narrow down what you want to do.
  11. @Steven P Thanks for taking the time respond, I seem to be on the right track now with entupd and similar functions, thank you so much! @exceed Thank you as well! Right now the issue is taking the text we've already edited and dumping it back on the drawing. Also I didn't want to post any code because it's loaded with propriety info as is, sorry about that >.< Thank you for the tip about running commands without the dialog box, those commandline tricks always evade me lol As always, y'all on here are legends!
  12. I can't be sure if I understand correctly because there is no example code or drawing, Selecting text from the entire drawing without user selection (ssget "X" '((0 . "*TEXT))) ends with this one line. Changing text is sometimes convenient with (vl-string-translate ~~) To execute a command without a dialog box, add - in front of the command.
  13. If you have selected Big Ol String then that should be accessible to replace later as an entity After that you might look at ent update to replace the text with its new text. Should be that you update dxf code '1' How big is the Big Ol String by the way? If it is very big ol string or massive ol string you might find that the text is split between a couple of dxf codes, you'll have to delete these before you put your new text into dxf 1. If I get chance I have this somewhere and can dig it out later, and if not might give you a clue where to look
  14. Bill Tillman

    Pipe Dreams

    SEANT, yes, even though it's not clearly visible. This total assembly is made up of 3 pieces which spans over 82 feet. And the radii change several times between the bottom and the centerline of it. It's symmetrical so that means I only need to get one side of it and then mirror it. The layout did work when I put is on top of the rolled tube. So we're proceeding with fabrication.
  15. Good morning, afternoon, evening everyone. I've hit yet another snag in my efforts to code some useful lisp programs. The functionality of the code is to rip a big ol' string from an mtext object, compare it against another string that exists in a variable, then edit the big ol' string to remove any lines of text that doesn't have a equivalent. Once the big ol' string has been edited I want to replace all the original text in the mtext object with our new string. As is I have managed to do all the comparisons and edit the big ol' string in memory, but replacing the old text in the mtext object with my new string confounds me I've searched around to see if there were any functions the generous peeps of this community, and found some promising code from Lee Mac, his batch find function, As well as other functions, but they all seem to involve popping up a dialog box and selecting objects. I also figure the FIND command could do it, but it also prompts the user to select an object and type a string but all that information is sitting in memory already, seems like a waste of user time. I don't want a dialog box Any recommendations?
  16. That's not how blocks work. you can have a dynamic block that changes shape or attributes that can change. but once you start changing the layer or other core proprieties that affect goes to all blocks sharing that name. you would essentially have to explode and remake the block and all nested blocks under a different name and then join them back in the same order.
  17. Steven P

    Room dimension lisp

    No problem,
  18. rose sr

    Room dimension lisp

    Wow this works. thank u very much. saves lot of time.
  19. CyberAngel

    SOLVED? Structures not showing up in profile

    It's two weeks later, and the same problem came back. I tried restoring the pipe catalog files again, but that didn't work. What did work was the nuclear option. I wrote down the inverts for each box. In turn I disconnected the pipes from each box, deleted each box, created a new box, adjusted the plan label, reconnected the pipes, and redefined the inverts. Then I toggled the Draw button for each box in the profile view. Finally I added a profile label for each box. And if the problem comes back again, I'll have to re-create all the structures again. Thanks to the users on some other board who suggested this fix. The only reason I can see for this issue is a faulty audit, or a corruption that affected a subsequent audit. This doesn't happen in every drawing. I noticed an audit had removed a number of aecdb* blocks. Since the structures remained on the plan, it must have been the instances of those structures on the profile that broke. Why Civil 3D can't recover from an error that it created itself is a mystery.
  20. Steven P

    Room dimension lisp

    OK So it you might have made something like this if you got it to work: (defun c:testthis ( / spt1 spt2 roomname a b c d scpt1 mywidth myheight) ;; after the '/' are local variable names (setq ;;setq: Tells LISP you are setting a variable spt1 (getpoint "\nPick the first point") ;;should be obvious what this does spt3 (getcorner "\nPick the next corner" spt1) ;;should be obvious what this does roomname (getstring "\nEnter Room Name: " T) ;;T allows spaces, else space acts as a return a (if (< (car spt1)(car spt3))(car spt1)(car spt3)) ;;Lower Left X coord car gives first item in a list, here x coord b (if (> (car spt1)(car spt3))(car spt1)(car spt3)) ;;Upper Right X coord c (if (< (cadr spt1)(cadr spt3))(cadr spt1)(cadr spt3)) ;;Lower Left y Coord cadr gives second item in a list, here y coord d (if (> (cadr spt1)(cadr spt3))(cadr spt1)(cadr spt3)) ;;Upper Right Y Coord ) (setq mywidth (abs (- a b))) ;;abs for absolute value (witohut = or -), (- is subtract (setq myheight (abs (- c d))) ;;center points (setq scpt1 (list (/ (+ a b) 2) (/ (+ c d) 2)) ) ;;create a coordinate which is a list (/ for divide (+ for add (command "mtext" scpt1 "J" "MC" scpt1 (strcat roomname "\n" (rtos mywidth 2 2) " x " (rtos myheight 2 2 )) "") ;;Command echos what you'd type in command line, anything in "" is a fixed value in else it is calculated ) Put a few notes in if you want to learn how it does what it does
  21. ReMark

    Colored Plans

    Research the topic "rendering architectural drawings".
  22. Yeah I saw that Steven but they way they have their layers named the list would show up as 1, 10 - 19, 2, 20 - 29, 3 Was thinking about that. if they need it to do something like that ill update the code. -edit- Also had vplayer to turn off all layers but it was late and took it out. that's why their is lst2str in there. converting ("01" "02 ..." to "01,02..." I guess you could add it back in before mspace. was misunderstanding what All meant in the options it means all viewports on the current tab not drawing. (vl-cmdf "_.vplayer" "f" (lst2str "," layer) "all" "" "")
  23. Tharwat

    Room dimension lisp

    Create your Mtext with contents with respect to alignments Middle Center if required then move it via specifying the two points diagonally.
  24. Hi. here is the final updated lisp. the major change is that the 2 layers are not hard-codded in the lisp,but the lisp prompt the user to select them. thanks again for all the help, Ari. cdnc5-02_6.lsp
  25. Its quite with many codes to cover the process correctly, would like to write it for you but I need a few encouragements.
  26. rose sr

    Room dimension lisp

    Thanks for the reply Stevan P. not able to get the rest of it. tried. please help
  27. Hi, Would like to engage in discussion regarding colored plans esoecially architectural items. Is there some codes or guidelines or purely from experience tutorials, hints and tips on coloring the usual black ink plans? I am looking for the best color to enhance architectural items like common masonry units Walls, columns, kitchen table, sanitary wares, ceramic tiles, timber floowing, bed, furniture (dining tables, chairs, stools, cabinets), appliances (fridge, oven, range above (shown with hidden lines), human beings, plants, sink etc. Then we have the openings mostly Aluminium, Glazing and Timber Doors. and the railing. Your experience and input will greatly benefit me and others. Thanks.
  1. Load more activity
  • Create New...