Jump to content

Discussing Dimension driven in CAD


lucas3

Recommended Posts

What is the purpose of this?... I normally draw things I don't want to modify, and then just dimension them and that's it... If somethings wrong I repeat the process from start of wrong things that are drawn... I bet I can finish the job faster than with above posted examples for modifications...

Link to comment
Share on other sites

  • 1 year later...

Powerful !

 

here is a simple .

 


;;;author : BDYCAD
;;;2005-03-18
(defun c:tt(/ BLB EP ESPL N-EP N-SP NEW-T SD SD-DXF SEA SEB SP SS1 SS2 SS3)
 (setq SD (entsel "\nChoose dimension:"))
 (if SD
   (PROGN
     (SETQ SD-DXF (ENTGET (CAR SD)))
     (WHILE (NOT (wcmatch (CDR (ASSOC 0 SD-DXF)) "*DIM*"))
(setq SD (entsel "\nChoose dimension:"))
(SETQ SD-DXF (ENTGET (CAR SD))))
     (SETQ SP (CDR (ASSOC 13 SD-DXF))
    EP (CDR (ASSOC 14 SD-DXF))
    ESPL (DISTANCE SP EP)
    SEA (ANGLE SP EP)
    SEB (ANGLE EP SP)
    NEW-T (getdist "\nNew value:"))
     (while (eq nil NEW-T)
(setq  NEW-T (getdist "\nNew value:")))
     (if NEW-T
(progn
     (setq BLB (* 0.5 (abs (-  NEW-T ESPL))))
     (if (> ESPL NEW-T )
(setq N-SP (POLAR SP SEA BLB)
      N-EP (POLAR EP (+ PI SEA) BLB))
(setq N-SP (POLAR SP SEB BLB)
      N-EP (POLAR EP (+ PI SEB) BLB))
)
     (setvar "osmode" (logior (getvar "osmode") 16384))
     (setvar "cmdecho" 0)
     (vl-cmdf "_.undo" "_group")
     (SETQ SS1 (SSGET "C" (POLAR SP (+ PI (* 0.25 PI)) 0.4)(POLAR SP (* 0.25 PI) 0.4))
    SS2 (SSGET "C" (POLAR EP (+ PI (* 0.25 PI)) 0.4)(POLAR EP (* 0.25 PI) 0.4))
    )
     (IF SS1
(COMMAND "STRETCH" (SSGET "C" (POLAR SP (+ PI (* 0.25 PI)) 0.4)(POLAR SP (* 0.25 PI) 0.4)) 
  ""SP N-SP))
     (IF SS3
(COMMAND "STRETCH" (SSGET "C" (POLAR EP (+ PI (* 0.25 PI)) 0.4)(POLAR EP (* 0.25 PI) 0.4)) 
  ""EP N-EP))
     (vl-cmdf "_.undo" "_end")
     (setvar "osmode" (logand (getvar "osmode") 49151))
     (PRINC"\nComplete!")))
     )
   )
 (princ)
 )

Link to comment
Share on other sites

This is built into AutoCAD with parametric dimensions.

 

yes, parametric dimensions can do ,but is inconvenient. I'm sure OP' s demo is not use parametric dimensions.

Link to comment
Share on other sites

yes, parametric dimensions can do ,but is inconvenient. I'm sure OP' s demo is not use parametric dimensions.

 

I would be interested in hearing how parametric dimensions are inconvenient. They are as easy to apply as a regular dimension.

Link to comment
Share on other sites

Inconvenient = don't know how to use.:lol:
If you don't know how to use it then that means you've never tried it. :lol:

 

They're awesome, especially for Dynamic Blocks. Can be very powerful.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...