Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/28/2022 in all areas

  1. IE: (setq pt1 '(0 0) pt2 '(150 250) pt3 (mapcar '+ (list 0 (cadr pt2))) pt4 (mapcar '+ (list (car pt2) 0)) ;; or less 'fancy' pt3 (list (car pt1) (+ (cadr pt1) (cadr pt2))) pt4 (list (+ (car pt1) (car pt2)) (cadr pt1)) )
    2 points
  2. I Think that has something to do with how you setup the drawing or created the line. entsel doesn't round numbers. in this example my linear precision is set to 4 but still shows 13 digits for 10 & 11 points
    2 points
  3. Here you go. (defun c:Test (/ int sel ent nxt) ;; Tharwat Al Choufi. - Date: 27.Jun.2022 ;; ;; website: https://autolispprograms.wordpress.com ;; (and (setq int -1 sel (ssget '((0 . "*DIMENSION")))) (while (setq int (1+ int) ent (ssname sel int)) (setq nxt (tblobjname "BLOCK" (cdr (assoc 2 (entget ent))))) (while (setq nxt (entnext nxt)) (entmod (append (entget nxt) '((62 . 1)))) ) ) (command "_.REGEN") ) (princ) ) Like, Share and subscribe.
    2 points
  4. Hi guys, As thanks for helping me out through the journey of AutoLISP from multiple posts, I've decided to make a small contribution to CADTutor.net with my own code that you can download from here: https://www.cadtutor.net/forum/files/file/27-block-overkill/ Upon issuing the BOVERKILL command, This LISP will allow you to either delete blocks that area "duplicated" on top of one another, or move them to a specified layer. This LISP deletes blocks in which the blocks in comparison abides to the following three criteria below: It shares the same insertion point to a specified tolerance It shares the same effective name It shares the same effective scale to the same specified tolerance Modes of Overkill Thanks to a wonderful suggestion from one of the insights in this forum, the program has been further upgraded as of 20 April 2023. This LISP routine now also allows for three modes of overkill: Distance Plane-Axis Axes The "Distance" mode is the default mode and is the most widely used mode of overkill. This mode determines that two blocks are considered duplicates if the distance between them is within the specified tolerance inputted by the user. The "Plane-Axis" mode determines that two blocks are duplicates if the proximity of the blocks in comparison lies within one tolerance specified for one of the planes , and a separate tolerance along the third axis (normal) of that plane. Calculations are done to the UCS. The "Axes" mode determines that two blocks are duplicates by comparing three different tolerances across each axis individually. All three tolerances must be met for the program to consider the blocks a duplicate. Just like the previous mode, the UCS will be used by the program to perform the calculations. Following this, the program will also draw a circle (of a radius set within the LISP routine) on the insertion points of the processed blocks. These circles will be drawn in the "BOVERKILL-Duplicates" layer. After which it prints a report of the quantity of the deleted or modified blocks to the command line. This feature makes it easy for users to identify where duplicates are found on a large drawing with thousands of blocks. However, the dynamic properties of the block are far too hard for me to calculate as they have different position, rotation and visibility parameters that could be altered by the user. As such, they are ignored. Note that the rotation of the block does not fall in the criteria above as mirroring the block alters it's rotation values, and thus will fail on some circumstances. This means that the blocks will still be processed if as long as the three criteria above satisfy and objects are not rotated the same way. This LISP was inspired when using block counting routines (for example from Lee Mac's Block Counter routine or your own custom routines) reporting incorrect numbers due to duplicate blocks. The OVERKILL command for one reason or another is not able to delete duplicate dynamic blocks that are (for example, rotated normally then rotate through dynamic rotation to the original position). I've also cycled through the net for solutions to no avail. Thus, I opened this program for you folks to use. It's not a perfect code but I hope it will make working for you much more convenient. Any feedbacks, comments, and criticisms are welcomed as I look to learn and get better. Enjoy. Thanks, Jonathan Handojo
    1 point
  5. 1 point
  6. Tharwat to the rescue, he'll get you back on the tracks. Is this something to be done ONLY to selected dimensions, or across the board to all dimensions in the drawing?
    1 point
  7. The dwg saved without problem. So the problem looks to be on the third party's end.
    1 point
  8. Thanks, Tharwat! Lisp has actually changed it to red, but when i moved it to another location, the red color was lost. Can you change its properties?
    1 point
  9. Like mhupp if you look at a point X Y Z etc (rtos (car pt) 2 6) will display X with 6 decimal's.
    1 point
  10. That's a good point, but I am assuming if your asking the user to select the points it has to be horizontal, because their isn't anyway to tell the angle of the rectangle by just two points. maybe that is what @MetalSutton is asking about?
    1 point
  11. Compare the new endpoints of ent1 to p1 and p2 one will match the one that doesn't is the new trim point. -edit You could also use visual lisp. might need to use (vl-load-com) (setq pt (vla-intersectwith (vlax-ename->vla-Object ent1) (vlax-ename->vla-Object ent2) acextendnone)) (setq pt (vlax-safearray->List (vlax-variant-vaLue pt)))
    1 point
  12. 1 point
  13. Wow thank you so much everyone for your responses! This is wonderful to have people to talk to about this. I really appreciate the reassurance as well. Yes, the main reasons why I had decided to go with Penn Foster was dual: 1) to hopefully learn valuable skills that I might have overlooked while trying to self teach (which I will say I have learned things, so I am not entirely displeased in that regard at this time) and 2) to get access to the student AutoCad as it is rather expensive otherwise and I figured the cost of the course was actually cheaper than a year of AutoCad. I am not sure if this was the best way to go about that however. I did not suspect that a certificate from PennFoster would carry significant weight in the real world, but figured it wouldn't hurt me. As for a discipline, I am not entirely sure yet. I absolutely love the idea of architectural drafting, although I suspect that this field is very saturated and harder to break into. I am a private pilot and my father has been an airframe and powerplant (A&P) mechanic for 30 years, so I have grown up in an aviation household, and I live in Tulsa Oklahoma which is an aerospace hot bed, so I imagine there are lots of opportunities in that field, although I will admit that I find the mechanics of aviation much less interesting than the actual flying part of it. Another big industry in my area is oil and gas, so I imagine there is a lot of work to be found in that field here. I also have about 15 years of experience in the landscape industry. So what I am drawn to and truly interested in is more architectural or landscape/property design. As someone who has trained many people in fields new to them, I am a firm believer in the fact that I would rather have someone who has no experience but it willing to learn, rather than someone who has all the right certifications but has no humility or actual knowledge. So I feel like if I can develop enough of the basics and can find the right place willing to continue my training I can be a valuable asset. I am happy and willing to be taught, and I feel that the right employer will see that as a plus. Thank you everyone so much for your responses. I am very much looking forward to continuing to learn.
    1 point
  14. Mike, What you say has worked. I didn't see your post before I replied. Thank You
    1 point
×
×
  • Create New...