Jump to content

HEEELP!!! How to make a dimension to a line?


Recommended Posts

Posted

I have this points with his line:

 

(setq l1 (getreal "\nLongitud de Apoyo:"))

 

(setq p1 (getpoint "\nPunto Inicial:"))
(setq p2 (polar p1 0 l1))

 

(entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p2) '(62 . 2)))

 

 

How can I make dimensions of this? 

 

Thanks for help to much, Im a begginer and I dont know enought.

Posted
1 hour ago, marko_ribar said:

 

I did this question, they didnt give me the correct answer

Posted (edited)

why not just enable polarmode or orthomode?

 

coding is superfluous?

(defun c:tt ( / p1 x)
 (and (setq p1 (getpoint "\nPunto inicial: "))
      (setq x (getdist p1  "\nLongitud de Apoyo: "))
 (vl-cmdf "_DIMLINEAR" "_non" p1 "_non" (polar p1 0 x) (mapcar '+ p1 (list 0 (* x -0.5 )) ) )
)

(princ)
)

 

 

Edited by hanhphuc
"_non"
  • Thanks 1
Posted
10 hours ago, hanhphuc said:

Coding is superfluous?


(defun c:tt ( / p1 x)
 (and (setq p1 (getpoint "\nPunto inicial: "))
      (setq x (getdist p1  "\nLongitud de Apoyo: "))
 (vl-cmdf "_DIMLINEAR" "_non" p1 "_non" (polar p1 0 x) (mapcar '+ p1 (list 0 (* x -0.5 )) ) )
)

(princ)
)

 

 

Looks similar to the solution previously provided.

  • Thanks 1
Posted
8 hours ago, Lee Mac said:

 

thanks @Lee Mac i notice same link as @marko_ribar provided

it was confusing OP has multiple posts, should have replied at that thread or here? 😅

 

initially i was thinking OP's 0.5 =(dist x 0.5) like this


(defun foo ( p1 p2 / )
(entmakex
      (vl-list*
	'(0 . "DIMENSION") '(100 . "AcDbEntity") '(100 . "AcDbDimension")
	'(70 . 32) 
	 (mapcar 'cons '(13 14 10)(list p1 p2 (mapcar '+ p1 (list 0.0 (* (distance p1 p2) -0.5)) ) ) )  
      )
   )
)

but OP repeats here asking this input

(setq l1 (getreal "\nLongitud de Apoyo : " ))

(setq p2 (polar p1 0 l1))

so i was just following same idea polar & getdist/getreal which ignore his entmakex line (confusing!)

 

though i'm not very used to (command ... ) in code, never thought it accepts list like this (list ln p1) !  👍

  (command "_.dimlinear" "" (list ln p1) "_non" (mapcar '+ p1 '(0 -0.5 0)))

 

p/s: moderator: merge?

 

 

 

 

 

 

 

 

 

 

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