SLW210 Posted 16 hours ago Posted 16 hours ago I don't know if there was ever another LISP/Program to do this type of get length at least I never found one, my original just did what I needed, I have since made it more generally useful (I hope). As per the drawing I will attach, I just need to get the length of the center between the inner and outer of the perimeter of guards, etc. to determine the unrolled length. Normally the guards are 3D and I create the profiles with SOLPROF which creates an anonymous block (I used to change these with UNANON) or sometimes in the past I have used SOLVIEW and SOLDRAW, the same issue arises that you just can't select them and get the profile length. So originally that's what this LISP was created to do (I still have some of the older basic versions). I have upgraded it to it's current state and also still working on another version, but only small enhancements. For inside a block that is scaled, you will need to multiply the results by the scale factor, working through a viewport the viewport needs to be active, so I might tackle those issues as well as make a more detailed CSV. I also will try to make sure it works in non-AutoCAD like BricsCAD, CMS IntelliCAD, nanoCAD, etc. when I get time. I lightly tested in most situations, I have no idea how it acts on non-uniformly scaled blocks, though. It handles gaps and slight overlaps, I have some settings at the top, hopefully with enough instructions to modify on your own. Where I work (except for the machine shop which uses decimal inches) they use Architectural units, I did not double check this in Metric, so if someone would report back on that it would help. GetLenTest.dwg GetLen.lsp 1 Quote
BIGAL Posted 11 hours ago Posted 11 hours ago @SLW210 did a little bit of testing and works ok in Metric dwt. The only thing is the Architectural result. Limited Testing in Bricscad V25. made some shapes and inserted some blocks. A rectang 5000x4000 mm or decimal units. For metric don't need Architectural units. Curve length: 18000 Gaps: 0 Total: 18000 Architectural: 1500'-0" ?? For metric could do dwg is in mm but result is in metres to 3 decimals. You could use the Multi radio buttons.lsp to make choices. As its demand loaded you do not have to add it to your code. Re CSV your more than welcome to use the defuns in Alan Excel.lsp to write direct to Excel. Could demand load a lisp with just the defuns needed as don't need all that is in the lisp. Just a Ps a big file to screen copy maybe also post a file copy. 1 Quote
SLW210 Posted 1 hour ago Author Posted 1 hour ago Somebody else can add the Multi, it works great for my job right now. I do not want direct to Excel as I plan to use LibreOffice when away from work, in the beginning of updating I had thoughts of making it an option, that is still on the table. I may remove the code and just paste the file, so at least a sign-in is required. As for a long code to copy, just double-click the first character then shift-click the end. As for the Architectural: 1500'-0", you didn't change the values in the code to convert to mm, I put them at the top. Quote PROFILE 1 ================================ Block scale: 1.00000000 Objects traced: 1 LWPOLYLINE Handle=275 Length=18000.000000 -------------------------------- Curve length: 18000.000000 Gaps: 0.000000 Total: 18000.000000 Architectural: 59'-5/8" ================================ I need to do a few changes on that output when metric, I'll see if the next version was already doing that. That's the reason I posted this version, to see what I didn't think of before the final version. I think I started the next version to include a DCL to switch instead of commandline as well as the report, as well as multiple selections and more columns in CSV. Is there a big need for meters in something like this? I know in the USA sheet metal is normally Metric in mm and Imperial is inches, sometimes on certain things they use Meters and Architectural, but I have seldom seen that. I do need to add the inches option as well, so Meters should be an option I suppose. I need to do more gap and overlap testing, most of my actual job is actually ends touching, I just needed to get them through a Viewport and in an anonymous block (I used to need to change to a regular block, then go to block editor, etc.), SOLPROF is lines and arcs, etc. so a lot of work . I'll finish up my work work and see if I have time to work on this some more. Thanks for the Metric test and BricsCAD test. If any GstarCAD, NanoCAD, CMS IntelliCAD users could test, that would be nice. I go over their sites and see if I can see what users report working and not working, but that probably doesn't cover everything or account for those that just made an error using the code. For USA that use both Metric and Imperial, would reporting both be beneficial? That might yet again be more options needed. P.S. My 3 grandkids from near me in Florida are now in Australia until the End of October, so last night my time they Facetimed me, so I got very little done at home. 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.