Jump to content

Creating Dimensions for multiple lines from Base line


acad1985

Recommended Posts

Hello Everyone,

 

I have a Drawing, in that i need to place the multiple dimensions from the Red Line (As Image). Is it possible to create multiple dimensions from the Selected or PLINE automatically by Lisp.

 

Can anyone please help me out.

image.thumb.png.e0658912121b890d1e8eb870ad62f34d.png

Thanks in Advance.

Link to comment
Share on other sites

Hello Exceed,

Thanks for your code. as you said this is working only with Y Axis line.

when i try to angled line, the dimension created with the start point of the line.

can able to create the dimension for angled line also? and also how to make dimension as attached image on Post#1.(Dimension Text should be outside either Left or Right)

 

Thanks.

Link to comment
Share on other sites

you can approach like this

 

get closest point from origin point to object

then make dimension with that point.

but in this case, have to think how to sort and offset them. 

 

and move dimension text is simple but delete inside line of dimension is automatically autocad do that in too short to place text case. anyother person can help you. 

Link to comment
Share on other sites

Somewhere have the sort v's point by making a list of ((offset pt )(offset pt ) ....) need also Lee's is point left or right of object so distance's are + -. Then use  dims use correct points,  may need to remove some of the dxf values in the dim so defaults are used. Will have a think.

 

-12 pt1

-8 pt2

7 pt3

12 pt4

Edited by BIGAL
Link to comment
Share on other sites

Hi Bigal,

 

Thank you so much, As you mentioned either one side, but it supports any angle.

Thank you so much for this code.

Link to comment
Share on other sites

I have fixed the dim text pt to be outside of the last offset. Picking twice can be removed by looking at left and right of pick point, but done simple for now.

Edited by BIGAL
Link to comment
Share on other sites

That was good Bigal, Can i get that updated one?

I have few queries on this, in my drawing Reference line (Base line, Red color line, see Post#1) having Global width values, so when i select that line for place dimensions, it's not working.

If i remove the global width from that line, then it's working. How to select global width line using this lisp.

and can we place all dimensions Left or Right side (As Post#1), when i run this lisp twice, both set of dimensions will be placed on both side.

Please give me any suggestion/solutions.

 

Error on global width line,

image.png.ed16335de7bbf8136f15e6372c61ae01.png

 

Can we align all the dimensions after the last line either left/right, is it possible?

 

image.png.7a41d9ab2492380cb0a0a731834e8ce2.png

 

 

Thanks.

Link to comment
Share on other sites

I updated the code above the text is placed at the 2nd pick point. Re left/right or all left or all right yes could be done. I will look into why pline with width does not work.

Link to comment
Share on other sites

On 2/4/2022 at 11:05 AM, BIGAL said:

I updated the code above the text is placed at the 2nd pick point. Re left/right or all left or all right yes could be done. I will look into why pline with width does not work.

Hi Bigal, Sorry for disturb you again. Is there any update on this?

Link to comment
Share on other sites

Ok simple fix in the code is a offset for selection I got lazy and did not remove the control line from a selection set so

 

(setq pt1a (polar pt1 (angle pt1 pt2) 0.0001)) change the 0.0001 to a number just wider than your pline 1/2 width. 

 

I will see if can find time to change to remove the chosen object from selection.

Link to comment
Share on other sites

Thanks Bigal, I have fixed the Pline width issue as per your guidance.

could you please help me to place all dimensions Left or Right side (As Post#1), when i run this lisp twice, both set of dimensions will be placed on both side.

 

 

Thanks again

Link to comment
Share on other sites

i was searching for similar kind of lisp, it almost saved my half day work...
Tons of Thanks Bigal for the code & being reason for my smile :)
Eagerly awaiting for the complete code.

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