Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts

Wednesday, 18 November 2015

Design Data Access Speed

For all my life I have been using Design Data folder on a network server as a mapped network drive. It was only recently that we got audit from Autodesk on one of our large projects and they told us that Design Data needs to be locally and that’s a “must” not a “should”.

All fine  and clear but how do you make sure that your local files are in sync with the network ones especially when dealing with multiple users so that the files are consistent on all workstations.

While you could browse the net a find a dozen free apps that can do that for you, installing and migrating apps it’s time consuming not to mention that installing to many utilities can slow down your computer to a halt.

The solution is to use a “bat” file pinned in the Startup folder.

*.bat files invented by Batman?

What is a BAT file?
A batch file (BAT) is a text file containing a sequence of commands and it’s called batch because it is used to feed the commands to the operating system in bundles rather than needing the user to type one at a time.

In our case we will be using a single command with various arguments to speed up the process, copying the whole folder structure overwriting all but getting newer files only.

Let’s see how to run those commands and how to get help choosing the correct arguments to parse over in the bat file.

On the Start menu choose start and type cmd (you can press WIN+R). We are going to use “xcopy” instead of the plain “copy” command because it will get the full structure of files and folders.


Tip: to see the arguments the command takes type your command and then add “/?” at the end like this "xcopy /?"

The arguments we are going to use are /s /d / y and if you type xcopy/? You will get the following description:
/S           Copies directories and subdirectories except empty ones.
/D:m-d-y     Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/Y           Suppresses prompting to confirm you want to overwrite an existing destination file.

So we are going to copy the whole structure, no empty folders, overwriting all files, but only copy newer files. The last bit will save a lot of time to an almost instant thing as we will see later.

Start Notepad, either by typing Notepad in the start menu or by using the Start/All Programs/ Accessories shortcut. Type the following:
xcopy "your source folder" "destination folder" /s/d/y  

Click on File / Save and in the Save as type choose All files (*.*). In the filename type a name followed by .bat like: “DesignDataCopy.bat” and choose a local folder to save like my documents or your desktop.


Drag the file from window explorer into Start/All Programs/Start to have it running when windows starts.

As you can see from my demo here, if the local folder doesn’t exist it will be created.


If a new file is added to the source folder when you run the bat file it will instantly be created on local destination. The /d argument makes sure only newer files are copied over speeding it all up.


Of course there’s a catch. If you modify any of the Design Data files you need to manually copy them over to the network drive so that by morning when everybody starts up the new files will be available for them.

This is one more reason to shutdown your computer in the evening and while I restart several times a day just to clear out cache and improve speed I’ve seen others that don’t restart for weeks. If so they need to manually run the bat file to get the updates.

The bat file is here to help... Why So Serious?




Later,
ADS



photo credit: Bat-man via photopin (license) photo credit: 辦公室的新夥伴-小丑先生 via photopin (license)

Tuesday, 3 November 2015

Restructure



Organizing and restructuring is daily job and you need proper tools for that. When I need to move components around there is no better tool than promote and demote.

Restructuring can be tedious and time consuming.
While these commands have nothing new in themselves and you probably use them all the time I would like to share some tricks and tips with promote / demote. The Demote/Promote helps restructure the assembly and you can use the shortkeys Shift+Tab (Promote) and Tab (Demote) or choose them in the right-click menu Component submenu.

Promote/Demote
                As I’ve mentioned before promote/demote is useful in T&P when you have fittings that can’t be deleted and you’re stuck with parts that don’t belong there anymore. You can try and use the DELETE key on your keyboard because sometimes that works, even though there’s no Delete on the right-click contextual menu when you select those fittings.
                At this point you either drag those fittings (multi-select works as well) to a higher level outside T&P where they can be deleted or you demote them to a subassembly that can be deleted afterwards.
                A different trick and different approach that I like to use when doing quick layouts for sale quotes would be to promote existing designs. Consider the following scenario:
I have a plant layout that looks similar to what the new client wants but he has supplied drawing for the plant room so I can’t just save the existing project with a new name. I create the room using the drawing provided by the client and then I place the existing layout that I don’t want/need to change using just a regular place command.
I then select all the components inside the existing project and I promote them to a higher level. The good thing about this technique is that the components will maintain position and even better they will maintain any constraints in between them. This saves time when under pressure and it helps me get quotes out in minutes; these are potential jobs anyway so why waste time on things that might not turn out to be of value.
As soon as you’ve promoted the components you can then delete the original assembly BUT in the dialog window choose not to save it otherwise the assembly will lose its components (promoted).
A different case would be when you have a subassembly more than once in the model and you need to promote its components. As soon as you promote one set of children they will disappear from the other subassembly. There are several ways of promoting the rest of the children up:
1 - If you use Vault or the subassembly is a library or read-only file then this will not work so get to the next point to see a solution. In all the other cases you can open the subassembly in a new inventor session and all you need to do is hit the Save button then head back to the first Inventor session and in the Inventor menu (big I top left) choose Manage and then click on Refresh. Inventor will complain that the subassembly has been updated outside the current session and prompt you if you want to save the current changes at which point you say NO. You can no promote another set of children and use Save on the outside session then Refresh it the current session.
Here’s a small animation.

use Refresh to update changes done outside the current session.
2 - If the subassembly is vaulted, or library read-only then the solution is much easier but takes longer to do. Because we can’t save the file in an outside Inventor session we can’t use the refresh command. The command will work but will not see any updates on the file. As soon as you’ve promoted the first set of children you can then close the assembly but in the save dialog choose NO on the subassembly which should be read-only anyway. As a side note when you use promote Inventor might ask you to check-out the subassembly from vault so you can choose NO in there as well. Now open the assembly again and you will see the subassembly in its original form and you can no promote another set of children.
TIP: If it’s a large assembly you are dealing with, opening and closing it all the time might not be efficient but you can save a copy of the subassembly in a read-write location and use the solution presented at point 1.
Here’s a video of the second solution. I am having a really small assembly but on large files this will not be an efficient solution.

close without saving will reload complete asm.
It is not complicated and I urge you to give it a try. Imagine how much time you will be saving in fixing constraints and dragging components to a similar position. 

Organizing can be easy with proper tools.

Later,
ADS


photo credit: <a href="http://www.flickr.com/photos/12897738@N00/144315128">Metrics</a> via <a href="http://photopin.com">photopin</a> <a href="https://creativecommons.org/licenses/by-nc-sa/2.0/">(license)</a>

photo credit: <a href="http://www.flickr.com/photos/99357189@N00/98009491">wrenched</a> via <a href="http://photopin.com">photopin</a> <a href="https://creativecommons.org/licenses/by-nc-sa/2.0/">(license)</a>

Thursday, 10 September 2015

Linking parameters



                A lot of the times you will need to create matching features (like holes) on different parts. You could create a single sketch and then derive it into separate parts or you could use “Make Layout” on the Layout panel of the Sketch tab, also located in on the Manage tab. This will use sketch blocks or solid bodies but you need to think ahead, and prepare the project beforehand and it will not be covered here. I want to talk to you about all those cases when you would use project geometry while in an assembly to mimic the features of one part into others. While this is fast and well permitted for small assemblies it is not recommended for large assemblies.

                In fact in my Application Options I have stripped out this making sure that adaptivity and associative doesn’t become a memory hog killing Inventor and taking all the fun out.



                TIP: If you hold down CTL wile projecting you will get the opposite of what you settings are. If the settings are set to create adaptive / associative edges then using CTRL you will in fact create non-adaptive / non-associative edges and vice-versa.

                In those rare cases where you just want to copy geometry from one part to the other you still have a lot of options like linking parameters, deriving one’s parameters into the other, copy the features/bodies at the assembly level and all of these options will update automatically for you. 

                But, do you really want it to compute them all the time, when using operations like rebuild all, when opening files, or when you just click update on the quick access?

                What I like to do is derive the parameters of one part into the other, no bodies, no other features, just the parameters and the reason for this is because a derived part can have the option to Suppress the link or Break the link so I can control what gets updated and more important when gets updated.

                TIP: part edges can change with a simple operation like chamfer or fillet and if you rely solely on project geometry with adaptivity you will have broken links and references.

                Give you parameters a name either when dimensioning or by adding them manually in parameters. When the dimension pop-up window shows up you can create custom name parameters dynamically by entering the name with no spaces, just underscore, followed by = and the value you want like this: “Hole_Distance=30”.

stop adjunsting your monitor, the screenshot is not paralel to sketch plane


                When you create a similar part go to 3D Model tab, Insert panel or Create panel and use the Derive button.



                In the settings dialog don’t bring any bodies, expand parameters and tick the ones you need bringing in.
                Now you can dimension your new part and have it update automatically when the original one changes.
                TIP: For coordinated assemblies you should look into linking files with excel which will provide a single source of control for your file updates.

Later,
ADS