1. ## BIGAL

Trusted Members

31

14,855

2. ## mhupp

Community Members

17

334

3. ## ronjonp

Trusted Members

16

1,928

4. ## Lee Mac

Trusted Members

11

20,638

## Popular Content

Showing content with the highest reputation since 09/18/2021 in all areas

1. ## Is there any way to get the coordinates of the center point of the text I selected？

Calculate the bounding box of the text object, and then calculate the midpoint of the diagonal, e.g.: (defun c:test ( / b e ) (cond ( (not (setq e (car (nentsel))))) ( (not (setq b (LM:textbox (entget e)))) (princ "\nInvalid object selected - please select text, mtext or attribute.") ) ( (entmake (list '(000 . "POINT") (cons 010 (trans (mapcar '(lambda ( a b ) (/ (+ a b) 2.0)) (car b) (caddr b)) e 0)) (assoc 210 (entget e)) ) )
4 points

Angels Do you mean angles ? You can set a different view angle in any viewport, can use UCS and save the UCS direction by name if you want. UCS OB S Road1 etc
4 points
3. ## Select Objects By Crossing Window

Use (SSGET "_C" p1 p2). The objects will need to be visible on the screen most likely.
3 points
4. ## Is it possible to auto extend or trim 2 different polylines to meet at the intersection at different elevations?

You quoted I have to manually put in each coordinated Cogo point (from old plans) So why not make a csv file with P,E,N,Z,D if your picking points from a existing plan what do they have, are they on a layer and with z's. By picking you can look at stringing the code using a while pick say edge of bitumen in sequence, so P,E,N,Z,001EB gets created the other side would be P,E,N,Z,002EB so the 2 sides do not join. Can you post a old plan dwg. May be able to do something with it.
2 points
5. ## Is it possible to auto extend or trim 2 different polylines to meet at the intersection at different elevations?

We have been using CIV3D for years and always auto strung the strings, we have around 270 codes in the "Description key sets". Some of these projects have in excess of 10,000 points. You just need a DWT that has the keys set up in it, there are basically 2 a numeric or a Alpha key set with a few that are both TR6 Tree 6m dia. Do you have access to a DWT that is set up ? If not we need to know what your codes look like. Ask who you bought the Civ3d from they should have some. Ok now for the real big news, in CIV3D you can export the Description keys but you
2 points
6. ## Multiple selection sets

I would suggest the following approach - acquire a selection set representing the union of the two sets and then use a conditional statement when iterating over the set: (if (setq s (ssget '((0 . "LWPOLYLINE,CIRCLE") (8 . "Layer,Different Layers") (410 . "Model")))) (repeat (setq i (sslength s)) (setq i (1- i) e (ssname s i) ) (if (wcmatch (cdr (assoc 8 (entget e))) "Layer") (progn ;; Do something ) (progn ;; Else do something ) ) ) )
2 points
7. ## Windows 11

@WimIs asking if his AutoCAD 2020 which is currently running on Windows 10 will work without problems on the new Windows 11. The answer is 'try it and see' AutoCAD 2020 was not designed to work with Windows 11 so there are no guarantees. No older software could possibly be developed with the built in ability to forsee changes within a newer OS. It is going to be down to the brave to take the chance and see if anything breaks or just behaves badly. So give it a go and let us know if you have problems
2 points
8. ## Is there any way to get the coordinates of the center point of the text I selected？

Like this (setq ent (car (entsel "\nPick text"))) (command "justifytext" ent "" "MC") (setq pt (cdr (assoc 11 (entget ent)))) (command "undo" 1) No Justifytext in Bricscad V20 ?
2 points
9. ## 3-point rectangle not drawing on UCS

Thank you for bringing this issue to my attention - I have now corrected the code on my site.
2 points
10. ## Is there any way to get the coordinates of the center point of the text I selected？

@mhupp You have to check that the justification is not left otherwise code 11 is '(0 0 0). (defun c:foo (/ ent pt) (if (setq ent (entsel "\nSelect Text To find Center Point: ")) (setq pt (cdr (assoc (if (= 0 (cdr (assoc 73 (entget (car ent))))) 10 11 ) (entget (car ent)) ) ) ) ) )
2 points
11. ## 3-point rectangle not drawing on UCS

With a little bit of fumbling around. I fixed it. Far as I can tell the entmake LWPOLYLINE is only using the x and y cords of the points. makes sense since its only 2d poly. Added two lines. Used what @marko_ribar said but it was dxf code 38 instead of 43. *edit must have misread. line 70 "elv (caddr (trans pt1 1 ocs))" to get the elevation. line 171 "(cons 038 elv)" to set the elevation of the polyline in the entmake function. "Lightly Tested" ;;-----------------------=={ 3-Point Rectangle }==----------------------;; ;;
2 points
12. ## 3-point rectangle not drawing on UCS

Hint : (entmake) function is missing DXF 38 group code... Try to fix it by adding it... Value should be derived from current UCS 3D space orientation in respect to OCS of LWPOLYLINE...
2 points
13. ## i want to get cg for an flat layout

@Gi7 The more information you provide, the more likely you are to get a good response to your question. I'm not sure there is enough information in your opening post.
2 points
14. ## Lisp to Automatically Place Block in a Selected Area?

Don't really need lisp knowledge to do what you want. just going to take a a few simple steps. Run the command to show the dcl menu. take a screen shot or write down all the words. use https://translate.google.com/ to translate them to your language. open up the lsp with notepad++ search for the french terms and replace them with what you translated to000.
2 points
15. ## Total Hatch Area to clipboard

It could be something like this: (defun C:HT (/ ctextc sset index area obj) (defun ctextc (stringa / html result) (if (= (type stringa) 'STR) (progn (setq html (vlax-create-object "htmlfile") result (vlax-invoke (vlax-get (vlax-get html 'ParentWindow) 'ClipBoardData) 'setData "Text" stringa ) ) (vlax-release-object html) result ) nil ) ) (if (>= (atof (substr (getvar "acadver") 1 4)) 16.2) (progn (prompt "\nSelect hatches: ") (if (setq sset (ssget '((0 . "HATCH")))) (progn (setq area 0) (repeat (setq i
2 points

Massage
2 points
17. ## Model Space vs. Paper Space-Scaling

With this lisp you can set text size by selecting any Text, Mtext or Attribute. Or hit enter and it will prompt you with a text size that will print at a height of 0.1" Enter to accept that or enter a different height. ;| Text size - This one you can get text size by picking text, entering a value, picking two points, or it will calculate it from CANNOSCALEVALUE if in Model Space. It doesn't change on Escape. (load "TXTsize.LSP") tas ; by: Tom Beauford Leon County Public Works Engineering ===============================================|; (defun C:tas (/ *error* var
2 points
18. ## Flipping my house around

Sorry couldn't resist it:
2 points
19. ## Retrieve list of applications with path?

Glad you found a solution you like. Only here trying to help people.
1 point
20. ## Retrieve list of applications with path?

Masterclass in how to win friends and influence people..... To be honest if BigAl doesn't have in the back of his mind a solution then there probably isn't one and what he is offering will work if you can persuade yourself and others to save LISP files in trusted locations... which AutoCAD can search through. How many LISPS and apps do you have loaded by the way, might be just as quick noting down the file paths manually and gong that way. The only other option is outside of AutoCAD to do a windows search for LISP files on a drive and go that way, Ex
1 point
21. ## Could someone please have a look at this short Cogo point creation script?

I don't have Civil 3D to test but looking at the lisp. it says ";Points Creation >Prompt For Elevations > Manual" manually type the "-CreatePointManual" command and see what its prompting for. then modify the lisp to meet your needs. might be as simple as adding another "" IDK. ("" in lisp simulates an enter key press or picks the default option) (command-s "-CreatePointManual" pt "" "") to (command "-CreatePointManual" pt "" "" "") I don't see where the user description of the point is being called. so that might also be a thing to add above. I never rea
1 point
22. ## LEE MAC ,about dynamic block countV1.lisp

Maybe use http://www.lee-mac.com/contact.html
1 point
23. ## Is it possible to auto extend or trim 2 different polylines to meet at the intersection at different elevations?

thank you If you have other questions, you should put your question in the Civil 3D Customization Forum from here https://forums.autodesk.com/t5/civil-3d-customization/bd-p/190
1 point
24. ## Is it possible to auto extend or trim 2 different polylines to meet at the intersection at different elevations?

ARE YOU USING CIVIL 3d Or auto cad And Attached example drawing
1 point
25. ## Getting the selection set that was just pasted

Rather than using paste why not use Paste as Block Ctrl+Shift+V? I'd use my Paste as Group macro: ^C^C_pasteblock;\(setq LstBlk(vla-get-Name (vlax-ename->vla-object (entlast))));_explode;_last;_-group;_create;*;;_previous;;(command "-purge" "B" LstBlk "N") (setq LstBlk nil)
1 point
26. ## Combining two lists by key number

Consider the following - (defun foo ( a b / y ) (setq a (mapcar 'list a)) (foreach x (reverse b) (if (setq y (assoc (car x) a)) (setq a (subst (vl-list* (car x) x (cdr y)) y a)) ) ) a ) For example: _$(foo '("1" "2" "3" "4") '(("1" "a") ("2" "b") ("2" "c") ("2" "d") ("3" "e") ("4" "f"))) (("1" ("1" "a")) ("2" ("2" "b") ("2" "c") ("2" "d")) ("3" ("3" "e")) ("4" ("4" "f"))) I'm unsure how you wish to handle these cases: _$ (foo '("1" "2" "3" "4" "5") '(("1" "a") ("2" "b") ("2" "c") ("2" "d") ("3" "e") ("4" "f"))) (("1"
1 point
27. ## Voltage drop calculator lisp - help

CircuitExample.dwg
1 point
28. ## Is there any way to get the coordinates of the center point of the text I selected？

You have to have Express Tools installed.
1 point
29. ## Is there any way to get the coordinates of the center point of the text I selected？

They normally are simplest, and usually work really well. My one I did a while ago and have learnt new stuff since then so there is probably a neater way to do that. I looked at this this morning for a short while (busy week here....), i spotted a slight difference in the centre points between text middle centre justification and the centre of the text bounding box that Lee uses, probably won't make any difference though in all reality. (my one is a part of another LISP to move the text to the centre of an object, a rectangle or circle or whatever and so having m
1 point
30. ## Is there any way to get the coordinates of the center point of the text I selected？

Lee's way is probably simplest but you can do something like this change the text to middle centre then retrieve the entget dxf 11 will show the centre so you would entmod 1st making it central then entget again. Will try to find some time to try it out.
1 point
31. ## clarification about circular markings

There's no way to tell from an image. Could be fields, image frames, text frames, proxy objects, Revit artifacts, or a bug. And that's just off the top of my head. There's a block or something that defines those section markers. I would look there first.
1 point
32. ## entmaking a dim with overides

Just to weigh in my 2¢ worth. I used to work with dims with overrides (usually just the text) all the time using LISP. I was often advised by experienced programmers to use entmake for dimensions, but I found much simpler methods along the way. For example, my routine only has about 4 or 5 lines of code but entmake required 20 lines or more. It all depends on an individuals needs, but for me I preferred the simpler method which just used the dim commands. If you wanted, you can even setup a DIMSTYLE and then set this is CURRENT before you run your LISP code. Then your dimensions with your desi
1 point
33. ## Printer problems with HP DesignJet T830 MFP

a trick to find the print limits of a tab is to create a view port and set it to fit. this will draw a viewport to the maximum size possible then just use that to draw up a polyline.
1 point
34. ## Help with change layer to 0

("clayer" "cecolor" "celtype" " celweight")
1 point
35. ## LISP for closed boundary with offset around polyline

Of course, there are more "elegant" solutions by using VLisp, but here I used some of BIGAL's code and got the attached drawing. So, try this: ;;Offset selected polylines (defun C:OFFPOL (/ *error* cm do of obj1 obj2 ent1 ent2 ent3 end1 end2 pe st1 st2 s1 s2 s3 xx) (defun *error* (s) (or (wcmatch (strcase s) "*BREAK,*CANCEL*,*EXIT*") (prompt (strcat "\nError: " s))) (setvar "CMDECHO" cm) (setvar "DELOBJ" do) (setvar "PEDITACCEPT" pe) (princ) ) ;;*error* (setq cm (getvar "CMDECHO") do (getvar "DELOBJ") pe (getvar "PEDITACCEPT
1 point
36. ## LISP for closed boundary with offset around polyline

Now you just need to use Lee-Mac's Outline Object lisp and your task will be complete.
1 point

1 point
38. ## Model Space vs. Paper Space-Scaling

Sorry, I just saw this. This might actually be VERY helpful. Very much appreciated. Thanks for the help.
1 point
39. ## Issue with offset inside lsp program & way to undo only second to last command

For creating parcels from polylines for a set area for surveyors this lisp is the bomb! https://www.cadtutor.net/forum/topic/70140-lisp-to-scale-by-moving-only-one-side/page/2/?tab=comments#comment-563855
1 point

1 point
41. ## How to rotate a polar array?

Are you trying to rotate the array around its original build point or around some arbitrary point? In other words, are you trying to redefine the array or to change the angle of the entire array? What type of component is in the array? Which command or property are you using to attempt the rotation?
1 point
42. ## How to rotate a polar array?

Can you post a .dwg? Rotate command should work. What exactly is or isn't happening?
1 point
43. ## how to make cross section from 3D Polyline

Hi Saqib_theleo .Thanks for the help. I want to add two things in the code can you Help? 1) Ask for section number and Insert on top in the midle of the section the section ( for example D1 , D2 etch) 2) draw a center line i 0,y with legth (Hmax-Hmin) Thanks
1 point
44. ## How to put structure on alignment

A Civ3d question or a Autocad question ? It is possible to get at the Alignment details that hide inside Civ3d, if you have the original pline used for the alignment then its a Autocad answer. Why not use Pipes if in Civ3d.
1 point
45. ## Display alert massage only one time

@Halsy Try something like this: (or (getenv "NameYouWantToUse") (progn (alert "Hello World!") (setenv "NameYouWantToUse" "Ran")))
1 point
46. ## if / or function

100% @Grrr if you want more detail you could also do. (cond ((and file1 file2) (princ "\nFound both files:") (princ (strcat "\n" file1)) (princ (strcat "\n" file2)) ; do stuff... ) (file1 (princ (strcat "\nFound: " file1)) ; do stuff... ) (file2 (princ (strcat "\nFound: " file2)) ; do stuff... ) (t (princ "\nNo files were found") ; do stuff... ) ) ; cond "found both files" "C:\project1\text\one.txt" "C:\project1\text\two.txt" or "Found: C:\project1\text\one.txt" instead o
1 point
47. ## Printer problems with HP DesignJet T830 MFP

There are so many variables - but the first thing I like to do is remove the printer itself variable. Set up your page setup like you think it should be and print to PDF. Now open the PDF in Acrobat or Bluebeam or whatever. Does it look right there? If so, then you know the problem is somewhere between your PC and the printer. Next, print the PDF from Acrobat/Bluebeam/Whatever to the printer - how does it come out? Basically remove a variable and note the results each time. Here, we have dozens of printer models and hundreds of u
1 point
48. ## RlxBlk - Replace / Redefine blocks , visibility states , preview and link attributes

Hi, Written a tool for replacing (updating) blocks. Had some spare time untill my boss recently used the W-word again (work , yak!) Anywayz , its a prototype so I'm not sure its stable and safe yet because I only did some lab testing. I hope it will be usefull. Not sure if I will be able to work on it further any time soon because I still have a few ideas and wishes. gr. Rlx RlxBlk manual.doc RlxBlk.lsp RlxBlk.dcl
1 point
49. ## Introducing... Dark Mode

Well, Dark Mode isn't compulsory Some people seem to like using Standard Mode during the day and Dark Mode in the evening. The best thing is, now there's a choice.
1 point