Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/29/2024 in all areas

  1. 1:85 is not a normal metric scale 1:50 or 1:100 would be a ore correct scale.
    1 point
  2. Those objects will not be within the tolerance distance of 0.25 that the code uses. Front view of circle ( blue ) and 3dpolys ( red ).
    1 point
  3. It sounds like your model space drawing units is set to meters not millimeters for starters.
    1 point
  4. no problem , this site is all about learning. Just meant to say if all your old blocks have a blockname like ...A0M06... you may be able to compress your entire routine to : (defun c:patjeacad ( / $p blk str s bn ip) ;;; ($p "DIN931-A0M06x45E" "*A#M##*") -> "A0M06" (defun $p (s p)(if (and (wcmatch s p)(/= "" s)) (cond (($p (substr s 2) p))(($p (substr s 1 (1- (strlen s))) p))(s)))) (cond ((not (tblsearch "BLOCK" "BL$2----_KADER")) (alert "Computer says no : No border in current drawing")) ((not (setq blk (entsel "\nSelect a bolt : "))) (alert "Computer says no : nothing selected")) ((not (eq (cdr (assoc 0 (entget (car blk)))) "INSERT")) (alert "Computer says no : selected item is not a block")) ((not (setq str (cdr (assoc 2 (entget (car blk)))))) (alert "Computer says no : bad block name")) ((setq s ($p str "*A#M##*")) (setq bn (strcat "DIN125A-" s "-E"))) (t (setq bn nil) (alert "Computer says no : invalid block")) ) (if (and bn (setq ip (getpoint "\nInsertion point : "))) (command "-Insert" bn ip "" "" Pause)) (princ) ) this line : ((setq s ($p str "*A#M##*")) (setq bn (strcat "DIN125A-" s "-E"))) would replace your entire cond function with all the wcmatch's inside it. But cond function with all the wcmatches inside is OK too , keeps it nice and simple and easy to add future blocknames to it. In the end its not about what works for me but what best works for you.
    1 point
×
×
  • Create New...