Jump to content

searching for a specific dimension value


Recommended Posts

Posted (edited)

Hi to all,

 

For some reason, I need to find drawings, among hundreds of others, containing dimension (dimensions) with a specific value.

 

Thanks in advance

 

James

Edited by JamesBorubar
Posted (edited)

obviously the first place to look is from the master himself :

 

http://www.lee-mac.com/bfind.html

 

have very quickly copied something together but it was (is) a rushjob and I have done zero testing so small chance it works... but if it does it places the names of the drawings thats contain the value you search in c:/temp/find_dimension_value_report.txt

 

gr. Rlx

FindDimensionValue.lsp

Edited by rlx
Posted
obviously the first place to look is from the master himself :

 

http://www.lee-mac.com/bfind.html

 

have very quickly copied something together but it was (is) a rushjob and I have done zero testing so small chance it works... but if it does it places the names of the drawings thats contain the value you search in c:/temp/find_dimension_value_report.txt

 

gr. Rlx

 

Thanks Rlx!

Looks good, but there is no "find_dimension_value_report.txt" file

Posted
Thanks Rlx!

Looks good, but there is no "find_dimension_value_report.txt" file

 

means no dimension was found matching your value. Possible problems I can think of , use of decimal point , for example 123.45 or 123,45. I use rtos function to convert a number to a string with a point and 2 decimals. Could try to turn it around and compare numbers rather than strings. Dimensions can have 2 values , the real (calculated) value and the override string. I would need a test drawing or you can do your own test in the visual lisp editor by placing a break before the test function : (equal dimval search-val) and inspect if they match.

 

gr. Rlx

Posted (edited)
means no dimension was found matching your value. Possible problems I can think of , use of decimal point , for example 123.45 or 123,45. I use rtos function to convert a number to a string with a point and 2 decimals. Could try to turn it around and compare numbers rather than strings. Dimensions can have 2 values , the real (calculated) value and the override string. I would need a test drawing or you can do your own test in the visual lisp editor by placing a break before the test function : (equal dimval search-val) and inspect if they match.

 

gr. Rlx

 

for the first simple test I put in two drawings the exact dimension d = 200, nothing more.

But in fact, in the 'real world' this can be a dot and comma problem.

Edited by JamesBorubar
Posted
else plan b , dragon-dim-Z : just save them all so you can inspect them in excel ...

 

gr. Rlx

 

Good idea!

 

Thank you

 

J.

Posted
Good idea!

 

Thank you

 

J.

 

 

you're welcome :-)

 

 

ps. you might want to comment out the second write-line in order to reduce the size of the csv file (just thought it looked kinda cool or impressive to generate a big *ss file haha)

 

 

gr. Rlx

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