John Peers
Over many years I've spent staring bleary eyed typing at a computer screen, two of the skills I've gotten pretty good at are typing, and the copy and paste hot keys (those are CTRL+C & CTRL+V if you're not familiar).
But there are times that I've found this doesn't help me. I use the methods I'm used to because they're comfortable.
That was what happened this morning, I was replacing a bunch of variables in iLogic and starting copying and pasting away.
Then it hit me.... Like a palm to the face it hit me!
There are Search and Replace tools in iLogic!
I've been copying and pasting a bunch of entries when I could have just used Search and Replace to get them all in one shot!
The real files I was working on are proprietary, so I can't show it here. So standing in for the proprietary files is a woodworking jig that I'm driving with iLogic.
It's a generic template I created for cutting shapes in boards. It's designed to be copied with Autodesk Vault's copy design tool. Then iLogic is used to change the dimensions of the base and positions of the handles, stop, and clamps to fit the board being cut.
The jig. iLogic drives the dimensions and positions of the components |
Here's an example of the code that's driving the jig.
'These parameters drive the Base Dimensions
Parameter("Cloudlift Fixture Base Test:1", "Width") = Base_Width
Parameter("Cloudlift Fixture Base Test:1", "Length") = Base_Length
Parameter("Cloudlift Fixture Base Test:1", "Length") = Base_Thickness
'These parameters drive the Spacing between handles.
Parameter("Cloudlift Fixture Base Test:1", "Handle_Spacing") = Handle_Spacing
What I really need to do is swap "Cloudlift Fixture Base Test:1"" with "Cloudlift Fixture Base dev:1", to reflect the change I made in a components name in the browser.
The component's new name in the browser |
I could copy and paste this with very little trouble. But in the file I was working with (the one I can't show), I had at least fifty entries that needed to be changed.
Now that isn't nearly as easy!
Fortunately, I realized that I could Search and Replace the data before my "Copy & Paste" habit got the best of me.
The dialog box below shows the Search and Replace tab ready to go. I have the text I want to find, and the text I want to replace all setup.
Since I want to change all the appearances of "Cloudlift Fixture Base Test:1" in this rule, I chose the "Replace All in this Rule" option.
Boom! That's it, I'm done!
Search and replace has done it's job! |
So what did I learn? Or rather "relearn"?
Don't get too comfortable. Every once in a while I need to take a step back and see if there's a better way to do what I'm doing.
I think if there's anything I'm grateful for this Friday, it's that I had my little epiphany before I started my "Copy and Paste" insanity. It saved me a nice little chunk of time, and a whole lot of headache!