cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Got tired of short lines?

ptc-248027
1-Newbie

Got tired of short lines?

I don't know how many of you got tired of seeing small lines that doesn't serve any purpose other than taking up filesize... I got something quick and half-dirty to work and below is a really simple macro that allow you to select lines that fit inside a 0.9x0.9 "select box". IsoDraw macros do seem to have limits, but it's also very easy to play with! Well, since it's a macro, it's slow, but it cleans up the drawing... I bet you can improve the code, why not get started to share other simple codes that helps all of us to get better/cleaner/faster iso (?) files. ------------------------------ Macro Select short lines 09 define x as integer define y as integer For x = 0 to 3500 step 1 For y = 0 to 250 step 1 SELECT RECTANGLE (x/10) (y) ((x/10) + 0.9) (y + 0.9) add direct end for end for end Macro ------------------------------ The file can be made in notepad and saved with a ".ism" extension in your macro directory (under your own \\documents and settings\application data\ptc\isodraw\macros\) Cheers Lars
6 REPLIES 6

Forgot to mention, it's only good for converted cad drawings! Most cadprocess conversions contain loads of small lines... Cheers Lars

Just a suggestion but if you save the macro instead to the IsoDraw install directory (would be C:\ptc\Program\Macros\ if installed to the root C: directory) the macro is then available to all users of the computer instead of the current user.

Hi Trevor, of course, if there are more than one user on the machine! I was just wondering if the path is valid if you still want "the rest" (import/export etc) to be personal? I tried the path you suggested before I used "the personal path". IsoDraw doesn't seem to look at \\C:\programs\ptc\isodraw\macros (at least not as default)... Hopefully it can be selectable in preferences to have different paths for macros vs others, I don't know, will look tomorrow (it's really late here now). Thanks Lars ...The more I look at that macro the uglier it looks, but it works...

From my personal testing and conversations with PTC both paths are checked for macros. I use the C:\ptc\Program\Macros\ for "production" macros. The user path I use for development. And no, IsoDraw does not allow you to specify another folder to check. We checked into this as we were hoping for a server location. We have instead moved to a batch file run during the startup of each PC.

Trevor, you're correct, both directories work, most likely I forgot to restart IsoDraw... Thanks Lars

Well, ain't the best, but this one allow user to select boxsize... Removed the non-working attempt to improve steplength (thus speeding up the macro) ------------------------------------- Macro Select short lines user def box define x as integer define y as integer define boxsize as float boxsize = get float "Please enter box size (typical 0.5-1.5)" For x = 0 to 350 step 1 For y = 0 to 250 step 1 SELECT RECTANGLE (x) (y) (x + boxsize) (y + boxsize) add direct end for end for end Macro ------------------------------------- Cheers Lars
Announcements