Jump to content

Dimension


DuanJinHui

Recommended Posts

Hello friends.

 

I want a Dimension like this .

 

1. Pick a line (centerline)

2. pick a point

 

Pick a line and one point , Calculate the other point , ps. this centreline is mirror line , so easy get other point .

Two point , use _dimaligned Dimension ............

 

1.png

 

Properties changes.

2015-08-25 Properties.png

 

Need a Option , Need diameter symbol ? choose yes or no , if choose "yes" , need text override. like this:

2015-08-25 -2Properties.png

 

 

This is what I need .

2.png

 

 

Thanks a lot.

Edited by DuanJinHui
explain clear
Link to comment
Share on other sites

Where does the diameter resides ? is it a value of Xdata attached to an object or what ?

 

Dear Tharwat.

Not Xdata, only use "Rotated Dimension"

Link to comment
Share on other sites

Hey, dude , not need use trim

 

attachment.php?attachmentid=55350&stc=1

 

attachment.php?attachmentid=55351&stc=1

 

But , I don't know how to do this use lisp .

 

 

as an electrical dragon I don't use dimension often , hopefully an mechanical dragon can answer your question better

icon11.gif

Link to comment
Share on other sites

Label the Linear dimension 15. Anyone who gets the "Half Section Cut" will understand the 15. As their is no circle shown or even endpoints to support a Linear dimension of 30 your "This is what I need" dimension is confusing at best.

Link to comment
Share on other sites

Label the Linear dimension 15. Anyone who gets the "Half Section Cut" will understand the 15. As their is no circle shown or even endpoints to support a Linear dimension of 30 your "This is what I need" dimension is confusing at best.

 

Mechanical Drawing Standard book

203-1.gif

 

Maybe need a Option , Need diameter symbol ? choose yes or no

Link to comment
Share on other sites

Mechanical Drawing Standard book

[ATTACH=CONFIG]55354[/ATTACH]

 

Sorry, never done Mechanical work. I imagine a Mechanical vertical would have that, there's an endless amount of stuff in Civil 3D you cannot do with vanilla AutoCAD.

Link to comment
Share on other sites

as an electrical dragon I don't use dimension often , hopefully an mechanical dragon can answer your question better

icon11.gif

 

electrical & mechanical at this Thread is not important ,

just Pick a line and one point , Calculate the other point , ps. this centreline is mirror line , so easy get other point .

 

Two point , use _dimaligned Dimension ............

Link to comment
Share on other sites


(defun c:dimdim    (/ cline pt1 pt2 pt3 dis inp dimtext)
 (if (and (setq pt1 (getpoint "\nSelect outer point"))
      (setvar "lastpoint" pt1)
      (setq cline (cadr (entsel "\nSelect centerline"))))
   (progn
     
     (setq pt2 (osnap cline "per")
       pt3 (polar pt1 (angle pt1 pt2) (* 2 (distance pt1 pt2)))
       dis (rtos (distance pt1 pt3) 2 2))
     (Initget "Yes No")
     (setq inp
        (getkword
          (strcat "\nEnter distance (" dis ") with %%c <Yes/No> : ")))
     (cond
   ((member inp '("Yes" nil ""))(setq dimtext (strcat "%%c" dis)))
   (t (setq dimtext dis)))
     (command "dim1" "al" pt1 pt3 pause dimtext)
                    
   )
 )
)

 

give it a go...

 

gr. Rlx

Link to comment
Share on other sites


(defun c:dimdim    (/ cline pt1 pt2 pt3 dis inp dimtext)
 (if (and (setq pt1 (getpoint "\nSelect outer point"))
      (setvar "lastpoint" pt1)
      (setq cline (cadr (entsel "\nSelect centerline"))))
   (progn
     
     (setq pt2 (osnap cline "per")
       pt3 (polar pt1 (angle pt1 pt2) (* 2 (distance pt1 pt2)))
       dis (rtos (distance pt1 pt3) 2 2))
     (Initget "Yes No")
     (setq inp
        (getkword
          (strcat "\nEnter distance (" dis ") with %%c <Yes/No> : ")))
     (cond
   ((member inp '("Yes" nil ""))(setq dimtext (strcat "%%c" dis)))
   (t (setq dimtext dis)))
     (command "dim1" "al" pt1 pt3 pause dimtext)
                    
   )
 )
)

 

give it a go...

 

gr. Rlx

 

Many thanks !;)

This is I need.

(command "dim1" "al" pt1 pt3 pause dimtext)	
(setq e1 (entlast))
(setq obj (vlax-ename->vla-object e1))
(vla-put-extline2suppress obj :vlax-true)
(vla-put-DimLine2Suppress obj :vlax-true)

Link to comment
Share on other sites

That last part wasn't in the job description so I assumed you had made a specific dimstyle :-)

 

 

gr. Rlx

 

Hi dude, This is a specific dimension , SO, no need a new dimstyle

why need use "setvar" ? Can replace?

Link to comment
Share on other sites

Hi dude, This is a specific dimension , SO, no need a new dimstyle

why need use "setvar" ? Can replace?

 

 

The setvar is used to get the perpendicular point on the centerline so from there I can calculate the 'mirror' point , the other point for your dimension. But don't worry , this var is replaced automaticly with every (last) point you click. This way it should work at all angles (haven't tested it)

 

 

gr. Rlx

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...