JamesBorubar Posted April 8, 2018 Posted April 8, 2018 (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 April 8, 2018 by JamesBorubar Quote
rlx Posted April 8, 2018 Posted April 8, 2018 (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 April 8, 2018 by rlx Quote
JamesBorubar Posted April 8, 2018 Author Posted April 8, 2018 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 Quote
rlx Posted April 8, 2018 Posted April 8, 2018 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 Quote
JamesBorubar Posted April 8, 2018 Author Posted April 8, 2018 (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 April 8, 2018 by JamesBorubar Quote
rlx Posted April 8, 2018 Posted April 8, 2018 else plan b , dragon-dim-Z : just save them all so you can inspect them in excel ... gr. Rlx FindAllDimensionValues.lsp Quote
JamesBorubar Posted April 10, 2018 Author Posted April 10, 2018 else plan b , dragon-dim-Z : just save them all so you can inspect them in excel ... gr. Rlx Good idea! Thank you J. Quote
rlx Posted April 10, 2018 Posted April 10, 2018 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 Quote
Recommended Posts
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.