AUTOMATIC DIMENSION SELECT OBJECT LISP

AUTOMATIC DIMENSION SELECT OBJECT LISP

Gaganpatel
Collaborator Collaborator
19,868 Views
38 Replies
Message 1 of 39

AUTOMATIC DIMENSION SELECT OBJECT LISP

Gaganpatel
Collaborator
Collaborator

 

Dear Sir,

 

I want to rectangle inner all attributes circle to attributes circle dimension automatic.

Please help me.

0 Likes
19,869 Views
38 Replies
Replies (38)
Message 2 of 39

Gaganpatel
Collaborator
Collaborator

 

Please help any body.

0 Likes
Message 3 of 39

Moshe-A
Mentor
Mentor
Accepted solution

@Gaganpatel  hi,

 

your request may look very simple to accomplish but it's totally beyond that but i managed to get over all the difficulties and i hope this will be your answer.

 

attached fdall.zip file contain fdall.vlx lisp file to be load in autocad.

 

cause you did not provide any explanation on what your are doing so i called the rectangle lines "Feature" and the lisp is Feature Dimension All.

 

it's important that you read this all so you will understand under what terms it works:

 

limitation:

the feature (the lines) must form a straight rectangle and must be aligned to wcs

 

dimension style:

the fdall.vlx uses the current dimstyle. if the dimstyle is not well defined, you will get ugly result. 

 

running lisp:

after loading it, you will be prompt to select objects: select the feature (4 lines) and all the circle blocks in one shot.

 

program process:

it start by checking what was selected e.g 4 lines that must form a straight rectangle and if it's not, you will be notify.

if some other thing went wrong or missing (like the circle blocks) you will be notify. the circle blocks must lay totally inside the feature otherwise they will be ignored.

if your selection was positive, you will get the dimensions. the horizontal dimension starts from the lower left corner of the feature and to the right and the vertical dimension starts at the same point and up (exactly the same as seen in your sample drawing)

the program brings in consideration that the feature is not accurately drawn plus the position of the circle blocks may not be exactly on XY coordinates so a small tolerance (it's call fuzz) is allowed and it for start set to 1 drawing unit. this means if a feature has up to 1 unit digression, it will still be considered a straight rectangle so as if 2 circle blocks on X (or Y) axis has up to 1 unit digression, they will be considered on the same line.

the vertical dimension line relatively spaced to the left 6 * dimscale factor and the horizontal dimension relatively spaced below  6 * 1.35 * dimscale factor. the tolerance and the spaced (6) factor are hard coded and if you want to change them you will ask me. also the 'circle' block name you may want in future to use another name. maybe in future i will open all that for you Smiley LOL

 

enjoy

moshe

 

0 Likes
Message 4 of 39

Gaganpatel
Collaborator
Collaborator

 

Dear Sir,

How to use this programs.

Please example.

 

0 Likes
Message 5 of 39

Moshe-A
Mentor
Mentor

@Gaganpatel ,

 

it's important that you read all the instruction - did you?  what did you not understand?

do you know how to load and run lisp?

 

0 Likes
Message 6 of 39

Gaganpatel
Collaborator
Collaborator

 

Dear Sir,

 

Please see the video not working

0 Likes
Message 7 of 39

Moshe-A
Mentor
Mentor

does the circles attribute block circle?

post this dwg so i can check

0 Likes
Message 8 of 39

Gaganpatel
Collaborator
Collaborator

Dear Sir,

i checked circle block not attributes block.

 

0 Likes
Message 9 of 39

Moshe-A
Mentor
Mentor

MR @Gaganpatel 

 

you did not read all my instructions, in order this to work the program need to known (in advance) what is the name of the block (circles) you are using otherwise it will catch any block inside the feature (rectangle) and you do not want that - yes?

 

attached is and update, now the block does not must to be an attribute.

rename the block name to circle and it will work.

 

moshe

 

 

0 Likes
Message 10 of 39

Moshe-A
Mentor
Mentor
Accepted solution

here is an update, it includes another command call FDSET which let you specifies these settings:

 

command: FDSET

[Block name/Tolerance/Dim space]:

 

for explanations about these setting read in my first post.

 

enjoy

moshe

 

0 Likes
Message 11 of 39

Gaganpatel
Collaborator
Collaborator

 

Dear Sir,

 

Thanks sir,

This program is good working  auto cad 2018.

But i want to auto cad lower version use.

Please share this program lisp file.

0 Likes
Message 12 of 39

Moshe-A
Mentor
Mentor

if you liked my solution then please mark this as your solution

specify the lower version

0 Likes
Message 13 of 39

Gaganpatel
Collaborator
Collaborator

 

Dear Sir,

 

Please share this program auto lisp file.

0 Likes
Message 14 of 39

Moshe-A
Mentor
Mentor

if i could do what you want, i would have done it in the first place

 

0 Likes
Message 15 of 39

Gaganpatel
Collaborator
Collaborator

 

Thank you very much sir

0 Likes
Message 16 of 39

Gaganpatel
Collaborator
Collaborator

Dear Sir,

 

Please modify the programs as per example drawing.

Attributes circle to circle.

 

0 Likes
Message 17 of 39

Moshe-A
Mentor
Mentor

@Gaganpatel ,

 


Attributes circle to circle.

i'm sorry but i do not understand what that means?

 


i have test FDALL on your new example.dwg and it works like a charm Smiley LOL i use FDSET to specify the block name (hope you are using it too) the only thing that needed fix is the dimension style...i set the overall dimscale to 10.0 and i got reasonable result.

 

moshe

 

0 Likes
Message 18 of 39

Gaganpatel
Collaborator
Collaborator

 

Dear Sir,

 

This program is working good but i want to ordinate dimension on this program.

Please find the attached example drawing.

Please help me.

 

0 Likes
Message 19 of 39

Moshe-A
Mentor
Mentor
Accepted solution

@Gaganpatel ,

 

here is the new version

again note, your dimension style is not set properly. FDSET continue to control settings.

 

enjoy

moshe

 

0 Likes
Message 20 of 39

Gaganpatel
Collaborator
Collaborator
Accepted solution

 

Thank you very much sir.

0 Likes