Monday, October 13, 2008

Revit 64bit & The Revit API

Revit 64bit has arrived for subscription customers, and is available from Autodesk's website. There has been some confusion around this release, as when you create a deployment of Revit off the disk, it asks if you would like to make a 64bit deployment. This is apparently a typo, and isn't really a 64bit version of Revit. So now the real deal is out, and should speed things up for Vista/XP 64bit users, especially those with 4gb of RAM. However, for API developers, it brings a couple of kinks to work around. Now the framework runs in 64bit mode, so there is the chance that some of your existing external commands will break. There are a couple of things that you can do if your external command, which was working fine in 32bit revit does not work in 64bit. Change the security permissions for Framework64 If you are receiving an error message that talks about System Security exceptions, then you should see my post on the issue of security with the 64bit .net framework. As the security settings are different in the 64bit framework, these will need to be updated as required. (Only if your application needs this, and you have access to change these settings, ie a LAN environment). Compile for Any CPU. Anthony Hauck pointed out to me that the Getting Started SDK guide has been updated to include: Compatibility of API applications with 64-bit Revit Most API applications can be built with settings that allow them to be used either with 32-bit Revit or 64-bit Revit. Use the following settings to build your project in this manner: For C# project, go to project property->Build tag, select platform target as “Any CPU”. For VB.Net project, go to project property->Compile tag, select platform as “Any CPU”. For C++/CLI project, open property page and go to Configuration properties->General->Common Language Runtime support, select /clr:safe. Note that there are some Microsoft components (such as OleDB provider for Microsoft Jet) that are not supported for 64-bit. All SDK samples are set up to work with either 32-bit or 64-bit Revit, except those samples that have dependencies to unsupported Microsoft components. For more information see this Microsoft resource: http://msdn.microsoft.com/en-us/library/ms241064(VS.80).aspx

Microsoft .Net should do all the hard work in compiling your code for 64bit compatibility (See Matt Masons post explaining why). And, as long as you don't access any 32-bit 3rd party DLL's in your application, everything should run smoothly. Compile for 64bit CPU. This should not be necessary, and is not ideal, as you cannot use it at all in a 32bit version of Revit, however it is usefull to try if only purely as a debugging tool. A problem I ran into was that one of my external commands just did not start, it did not display any error mesage, just didn't run. There was an entry in my journal file stating:
 ' 1:< DBG_INFO: Could not load file or assembly
'file:///L:\Revit\bwtools\Plotting\Plotting.dll' or one of its dependencies.
An attempt was made to load a program with an incorrect format.:
line 93 of .\Source\APIManagedExecuteCommand.cpp. 
This is the generic error for when a 32bit program is called from a 64bit environment. After some experimentation, it seems that this was caused by my application Microsofts 32bit DSOFile.dll. To get my program to start at all, I had to compile for x64, this didn't fix my problem totally (I'll discuss this below) however it allowed me to start the dll and debug to pinpoint where exactly the error was occuring. To do this in visual studio head to the properties page of your project and go to the 'build' section. Then set the platform target to 'x64'. I then specified a different output directory (as we have 64bit and 32bit users on our network) and built the project. It was then a matter of updating the target users revit.ini file to point to the 64bit build instead of the 32bit build. I did this by updating my ini edting program to detect if the operating system is vista, if so check if revit is in the program files, or program files (x86) directory and copy the text accordingly. This got my macro to start, but it then crashed when calling the DLL. This however gave me the chance to pinpoint the location of the exception. Find 64bit version of 3rd party DLL's The problem I described above, was due to me accessing a 3rd party COM DLL which is compiled for 64bit. The only way I am able to rectify this is by finding a 32bit version of the required DLL and installing it on the users machine. This will be different for each situation, but one thing to keep in mind that regsvr32.exe, the tool used to reference DLL's in the registry does not have a regsvr64.exe counterpart, contrary to common logic. Unfortunately microsoft decided to keep the name the same, but simply store it in a different directory. So C:\Windows\SysWOW64\regsvr32.exe is the 64bit dll registrar. Summary The process has been made really easy by the revit team, assuming one thing - you do not use a 3rd party 32bit dll. So for 99% of external commands, the switch is simple, and chances are you won't have to do anything! Unfortunately for the other 1% the reality of 64bit development is that you are going to run into problems with external 32bit references, and will probably be cast into DLL-hell. So test those commands! If anyone has had other issues with 64bit Revit they would like to share please comment this article or join this discussion at AUGI.

64bit System.Security.SecurityException errors

In a follow up to a previous post of mine, which talked about the intranet security levels and how to change the permissions. I have one change to make. When running your application in the 64bit framework, permissions are different, so the previously posted batch file will not do anything to solve your issues. To fix it, add '64' onto the end of the Framework part of the caspol path. for example: echo y|C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\caspol.exe -m -ag 1.2 -url file://server/share/* FullTrust I came across this problem using the new Revit 64bit with some of my API programs that access C drive or use the network.

Friday, August 29, 2008

RIS services fails to start with Error 127: the specified procedure could not be found error

This occurs after installing Windows 2003 SP2. The reason for this is that the new Windows Deployment Services (to allow Vista images to be made) is installed, and then is put in charge of the RIS deployment, rendering the Remote Installation service obsolete. To fix this, run services.msc and make your RIS service startup type to be manual or disabled, and select Windows Deployment Services to be automatic. You can then boot into the pre execution environment as normal and your old images will be there. See HERE for more information.

Wednesday, August 20, 2008

How to get the full path of a file from a HTML File Input

This could also be modified for use in an ASP.Net FileUpload. I was making an internal intranet site where I wanted a user to choose a file, and then my ASP.Net application would use the path to generate categories etc (ie if its in the Columns folder, the file is a Column). Unfortunately ASP.Net does not allow you to retrieve the whole path (ie C:\Columns\Test.rfa) from a file upload control, it only will show you the actual file name (Test.rfa). To get around this, I made use of Javascripts OnChange event. First, on the <input type="file"> I added "onchange="CapturePath(this.value);" Then, at the top of my page I added a javascript function which does the following: function CapturePath(value) { document.getElementById("<%Response.Write(filePathHidden.UniqueID);%>").value = value; } As I was using ASP.net, I wanted to store the path for postback to the server, so I added an control, called 'filePathHidden', and then when the user changes the value of the File Input, it sends the path to this hidden. You could modify the code to use a normal HTML Hidden as well. Then, on post back, I get the value of the hidden and use it as I please.

Monday, August 18, 2008

How to detect Windows Vista in batch file or logon script

Previously, in our logon scripts, we'd used the 'ver' command to get the windows version, and selected the third word (XP or 2000 etc) but now that no longer works properly, so a better way of doing it is this:

VER | findstr /i "5.0." > nul IF %ERRORLEVEL% EQU 0 set version=2000

VER | findstr /i "5.1." > nul IF %ERRORLEVEL% EQU 0 set version=XP

VER | findstr /i "5.2." > nul IF %ERRORLEVEL% EQU 0 set version=2003

VER | findstr /i "6.0." > nul IF %ERRORLEVEL% EQU 0 set version=Vista

This searches for the build number in the ver string.

Increase vista performance

A tweak I am doing on all Vista machines in the office here, is this: Go into control panel, choose classic mode - > Performance Information and Tools -> Adjust Visual Effects -> 'Choose for Best Performance' (this turns off everything) and then in the list check: - show thumbnails instead of icons - Smooth edges of screen fonts - Use visual styles on windows and buttons (to turn these 3 back on) These 3 are personal preference, but the last one especially makes a big difference in looks when it is turned on, without this your theme stays on the 'windows classic' mode, looking like windows 98 did. So if you don't like that theme, leave that one checked. This will get rid of someof the Vista looks, though it doesn't look all that different, and will make it feel alot 'snappier', especially due to the lack of fading in and out which makes your system appear slower.

Friday, August 15, 2008

the temp folder is on a drive that is full or is inaccessible. free up space on the drive or verify that you have write permission on the temp folder.

This error message occurs when you are running Windows Vista (possibly 64bit), and have User Account Control turned off (first thing I did) and are trying to install Adobe Reader 8. To fix the error, put UAC on, or right click on the setup and go to properties -> Compatibility - Run in compatibility mode for XP SP2. It should work fine.

Tuesday, June 10, 2008

How to set custom attributes / file properties on a file in C# .Net

In the office here we have developed a document management system, which uses Custom Properties on PDF and DWG files to keep a track of what revision etc they are. In my Revit API development, we required an easy way of settings these from inside of Revit, so I set about creating a plotting external command using the new Print methods in the 2009 API and PDF995's ini file.

Once I'd printed the documents, I wanted to rename them and set the custom properties such as Revision, drawer, designer etc. After much searching, I discovered what you need to get is "DSOFile" from Microsoft, it is intended for editing Microsoft Word document properties, but works on anything. There is an easy to understand VB.Net example included in the download.

DSO File works by adding a reference to the DLL and creating a new DSOFile.OleDocumentPropertiesClass, and then performing actions on that. So, I created a new: private DSOFile.OleDocumentPropertiesClass m_file; Then in my constructor for my ParamaterSetter class I created an instance of OleDocumentPropertiesClass and then called the Open() Method with my filename:

 //create new isntance of OleDocumentPropertiesClass
m_file = new DSOFile.OleDocumentPropertiesClass();
// select the file you would like to open
m_file.Open(path, false, DSOFile.dsoFileOpenOptions.dsoOptionDefault);

From there you can perform actions such as : m_file.CustomProperties.Add(key, ref valueForKey); where key is the name of your property, and valueForKey is the value. For more standard properties, such as the "Summary" properties (in summary tab when you go properties on the file), you can access them directly, such as: m_file.SummaryProperties.Comments = value;

For reference, here is the utility class I use:

class FileParameterSetter {

        //DSOFile document
        private DSOFile.OleDocumentPropertiesClass m_file;

        
        public FileParameterSetter(string path) {
            //create new isntance of OleDocumentPropertiesClass
            m_file = new DSOFile.OleDocumentPropertiesClass();

            // select the file you would like to open
            m_file.Open(path, false, DSOFile.dsoFileOpenOptions.dsoOptionDefault);

        }

        /// <summary>
        /// Sets a custom property in the file.
        /// </summary>
        /// <param name="key">key to set</param>
        /// <param name="value">value to set to key</param>
        public void SetCustomproperty(string key, string value) {
            try {
                object valueForKey; 

                //check for valid inputs
                if ((key == null) || (value == null) || (key.Length == 0) || (value.Length == 0)) {
                    //Error, no key or value.
                    return;
                }

                valueForKey = value;

                //write to file
                m_file.CustomProperties.Add(key, ref valueForKey);

                //save change
                m_file.Save();
            } catch(Exception ex) {

                System.Windows.Forms.MessageBox.Show("There was an error adding properties to PDF file: " +
                                                        ex);

            }
        }

        /// <summary>
        /// Saves and closes document
        /// </summary>
        public void Close() {
           m_file.Close(true);
        }

        /// <summary>
        /// Sets a standard property, such as Comments, Subject, Title etc
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        public void SetStandardProperty(string key, string value) {

            if (key.Equals("Comments")) {
                m_file.SummaryProperties.Comments = value;
            }
            if (key.Equals("Subject")) {
                m_file.SummaryProperties.Subject = value;
            }
            if (key.Equals("Title")) {
                m_file.SummaryProperties.Title = value;
            }
        }
        
    }

Tuesday, May 20, 2008

System.Security.SecurityException Request for the permision of type..... errors

I have been developing applications using the Revit API (based on the .Net framework) for my workplace. I have been storing these applications on a network drive and having each user simply run them from there. This allows easy updating and easy deployment. Unfortunately, Microsoft have battened down the hatches when it comes to security for applications not running off your hard drive. There are "Security Zones" in .net (you can see these on most machines in Administrative tools in .Net Framework Configuration), Intranet is one of them. The security level on Intranet is very high, just below the Internet level! So, any application running off a network drive will have issues if it tries to do anything other than basic GUI functionality. This includes TCP Streams (SocketPermission) and File Access(IOPermission). We have a file server which stores our files and programs, I want anything on that server to be trusted fully. After some searching I found a very helpful blog from "ShawnFa", who is a bit of a .Net security guru. So then, I just made a script which does: echo y|C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1.2 -url file://server/share/* FullTrust changing the server and the share to the ones you want to allow. Echo Y takes away hte need for the user to confirm. I've added the full path to the .net framework as the script didn't work for me without it, you might just need caspol.exe. But adding the full path gives you the ability to set it for different frameworks (.Net 1.1 applications don't use the .net 2.0 security I believe etc) Now I've dumped that in a startup script for my users, and all is good!

Sunday, May 18, 2008

How to update your facebook status via SMS

This post is a little different to my usual posts, in that it's not overly technical. I recently discovered Twitter, after initially thinking it would be useless, I've been thinking of more and more good uses for it, particularly to do with the API and the SMS functionality. But one that I don't need to code, is to update your facebook status via SMS. All you need to do is create a Twitter account, setup the SMS section of it (really easy), and then in your facebook, add TwitterSync (There is another twitter app too, but it wasn't working when I tried it). You dont need to put in your password if your twitter is public (as they are by default), then just allow it to update your facebook status when it asks and you are set. If you use your twitter for things you dont want to show on facebook (I use it to send reminders to myself for when I get home), there is a section in setup to put certain characters that tell facebook that its not meant to be your facebook display. I put "Nf" as mine, but you could put anything. It would be good if they could do it the other way (ie only update facebook status if you put facebook as the first word or something), but I haven't found this feature (let me know if its there!) Then you are all set, be careful, you'll get addicted and flood your facebook with useless updates, remember, your friends don't care if you are buying new toothpaste!

Thursday, May 15, 2008

Help, my database updates don't stick

Just a quick post to remind people of the ASP.net life cycle. Most people learn this early on in their ASP.Net life, but it's something that can be overlooked and leave you slapping your head in frustration. Recently, I was working on a simple page that has some text box fields, which are pre-populated with a users details, you edit those and click submit, it submits the new details and refreshes the page, hopefully with the new details. My database updates didnt seem to work, I searched through my data access layer and business logic layer to no avail, then I slapped my head and mouthed a few curse words when I realized that I'd populated my text boxes in the Page_Load section, when really I should have done it on the OnPreRender or a similar event (or, as mentioned in comments, use the !Page.IsPostBack method, though this way would simply retain the data inserted into the text boxes from viewstate, I wanted it to regenerate it from the database to ensure my data was inserted correctly and in the format I wanted) To brush up on the events life cycle check out this article.

Thursday, March 20, 2008

Using Revit KeyboardShortcuts for your external commands

In the previous post, I showed you how to connect your external commands into Revit, ready to be opened from the Tools -> External Tools menu. But what if you want to make a shortcut to it, lets say for example you want to create "HW" as the shortcut for your Hello World application. All you need to do is go to your Revit program directory, and open KeyboardShortcuts.txt, then scroll down to the Tools section, and add: "HW" menu:"Tools-External Tools-Hello World" Where HW is your shortcut, and Hello World is the ECName you added. Then typing HW in revit will open your command, easy!

Wednesday, March 19, 2008

Revit commands and the revit.ini file

My previous blog post on getting started with the Revit API showed you how to setup a template to start creating the .DLL files needed for revit external commands, but how do you actually get these into revit? Lets say, you have made a simple hello world command, one of which is in the API SDK for you to use as a reference. I mentioned, that the public IExternalCommand.Result Execute method is the start of your command, this is what gets called first, from here you can direct it to do what you would like it to do. For a simple example, import System.Windows.Forms, and add "MessageBox.Show("Hello World")" to your IExternalCommand.Result method, remember, we added try catch into the template, so put it into the try section. Now right click on your assembly, and click properties. Go to the "Build" section, and change the output path to the location you would like to store your .DLL files - I store mine on a network drive so that there only needs to be one copy of them for all users in our workplace, perhaps this isn't the best practice (I have to login to the server and kick others out of it if I want to update it), but it makes sense for my situation. Then go into the "Debug" section, and choose "Start external program:", and choose the Revit.exe on your system. This means that when we start Visual Studio's debugging mode, it will fire up Revit and provide some good debugging features. Now, you're set to start building your file. Go to "Build" at the top of your screen and go to Build *SolutionName* (this will be whatever you called your project). This builds the solution, ready for use. Now is where we get to the icky part, the Revit.Ini file. Autodesk, remembering the glory days of the 90's, have used a .ini text file to tell revit that we have some external commands that we would like to use. There is documentation on this in the Revit SDK, but here is what you need to do. :
  1. Open your Revit.Ini file
  2. Find [ExternalCommands] if there is one, if not, create that section.
  3. Insert the reference to your .DLL external command file, it should look similar to as follows
[ExternalCommands] ECCount=1 ECName1=ImportedCategoriesToggle ECClassName1=ElementProperties.Command ECAssembly1=L:\Revit\bwtools\ElementProperties\ElementProperties.dll ECDescription1=ImportedCategoriesToggle There, you can see the [ExternalCommands] header, and then under that is the ECCount, which tells revit how many External Commands are present. This will need to be incremented each time you add another command. ECName1 states the name which will show up in revit, ECClassName1 points to the Namespace.Class of your DLL file. So say you called your project RevitCommandOne and then made a class called 'Command' (as many of the examples do - you can call it what you like, or even have more than one in each Namespace), it would be RevitCommandOne.Command ECAssembly1 points to the dll file you exported, remember how you chose where to store this in the Visual Studio 'Build' properties? ECDescription1 is just a description of your command, add what you like. Of course, the '1' on the end of each of these fields is just saying its the first one, change this to 2 for your second and so on. As you can see, the Revit.ini file is a bit of a weak point, it would be much better if it was an XML file or something, so that you could programmatically change it without fiddling with text streams and regular expressions, but thats the way it is, hopefully in 2010 this might be fixed.... Once you have inserted that section, save it, and start Revit (you must restart revit each time you change the revit.ini file), then your command should show up in the Tools > External Tools menu. Simply click to run it. If Hello World does not show up, then chances are you have made a mistake in your revit.ini file, double check it all, make sure the numbers are correct, you've incremented the ECCount etc.

Sunday, March 9, 2008

How to make Vista look like XP

I just made the jump to Vista, purely for a 64bit Windows Operating system that has hardware support (There is of course 64bit XP, but it seems most hardware vendors put their hands over their ears and say "la la la I'm not listening" whenever you mention it). The most annoying thing for me, was the theme. I hate it, I hate the visual styles, I hate aero, I hate all of the shadows and transparency effects, in fact, it gives me a headache, literally. I tried to get used to it, tried tweaking it, turning off stuff etc but it didn't help. The main qualm for me was the black two-toned taskbar. The windows classic theme for Vista is a joke, it looks worse than it did in windows 98. I just wanted Vista to look like XP. So, I set about googling, though most of my results returned people wanting XP to look like Vista, it seemed I was one of the few who want it the other way around. I soon found out, that basically, Microsoft has done its best to stop custom themes, to perserve the branding of vista I believe (ie you look at a vista pc and you know its a vista pc), only themes created by Microsoft can be used. One option, is to use Windows blinds or something similar, but I want to increase performance, not reduce it! So that was out. I then stumbled upon Deviant Arts collection of custom themes, and noticed they used a hack to get the standard .theme files to work. I was told that Vista Glazz did the hacking for me and then all I had to do was double click the theme file. This didn't work either - I'm not sure why though. In the end, I used Tune Up Utilities. This allowed me to simply select what theme I want, and apply it, nice and easy. Then, after searching around and downloading a few themes, I discovered that a DeviantART user by the name of 'psychoB' has converted the old XP themes to vista, brilliant! Here they are: Luna Metallic (the theme I am using) Royale (Standard XP theme) and even the Zune theme See his other work at psychoB's deviantART gallery.

Friday, February 29, 2008

Revit 2009 API information

The gates are open, NDA is lifted, Revit 2009 API information is starting to come through, check out Matts blog with a heap of well written posts on some of the new features: http://cadappdev.blogspot.com/

Tuesday, February 19, 2008

Setting up a template for Revit API External Commands

Recently I have been commissioned to tap into the Autodesk Revit API, and create external commands for Revit Structure (Applies for Revit Architecture as well). Documentation is limited, and there are few experts in Australia at present.

I have used the AUGI Forum community, the API SDK Samples, and this API Webcast to get me going. If you plan on writing a lot of different external commands, then chances are, you're going to be best served with a Visual Studio template.

I'm still using Visual Studio 2005 with .Net 2.0, but I wouldn't imagine it would be much different in visual studio 2008. I am also using C#, rather than visual basic, as most of the examples are in C#, and it is my choice of language. To get you started, reading the introduction material in the API SDK is going to get you started, there is a word document there, then you will have a good idea of what I am doing.

First off, create a new project in Microsoft Visual Studio, just a Class Library will do, unless you want a dialog box in your template. Name it whatever you like (it gets changed when you make a template) and store it in a folder for your Revit commands. Normally here, I would right click on my assembly and go to properties and set a couple of things, but we will skip that step for now as those changes don't get saved in the template.

Now we need to import the RevitAPI file, go to Project > Add Reference, then browse to your Revit directory to find the RevitAPI.dll file, select it. Once it is imported, it will show up in the references folder, click 'RevitAPI' there and go to properties, change 'Copy to Output Directory' to 'Do not copy'. This stops a copy of the RevitAPI file, which is 5-10 mb being made each time.

There will be a default .cs file in your solution, named class1.cs or similar, change this to Command.CS (it doesn't really matter, however this is the format followed in the API samples). And then open it for editing. At the top, add 'using Autodesk.Revit;' to the using list. This tells the class that it will be using the RevitAPI file we imported. Now we need to tell it that this is going to be an external command, to do this, we inherit the IExternalCommand interface, by adding ": IExternalCommand" to the end of our class signature, making it: class Command : IExternalCommand Now, each IExternalCommand needs to supply a result, here is how we start the cogs of our command turning. In our class, create a 'public IExternalCommand.Result', as follows:
" public IExternalCommand.Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) {

} "
This should be nothing new if you have read the API documentation, but I am recapping it for you.

From here, your command will complete its actions, call other classes and methods, and then tell revit whether it succeeded or failed. Seeing as this is just a template, we just need to put the basic framework in, here's how i like to do it: "
try {
// Command does stuff here
return IExternalCommand.Result.Succeeded;
} catch (Exception ex)
{
MessageBox.Show("An error has occured in a this external command, please show this to your Revit Manager: \r\n " + ex.ToString());
return IExternalCommand.Result.Failed;
} "
As you can see, I have enclosed all of my code in Try Catch blocks, this is to make things end a little more neatly in case of a crash. You might like to cut your Try Catch block out while testing and learning, as the Visual Studio 2005 debugger has a hard time helping you when you use them, but make sure you put them back in. You also might not like to spit out the exception to the user, depends on the circumstances. You will also noticed I have added the return of IExternalCommand.Result.Succeeded in the try block, and Failed in the catch, so if an error occurs - the command fails, if not, it succeeds. That is how your command exits, when it reaches either of those lines of code.

Once you have done that, you might like to add some summary comments eg

///
/// Created by Rod Howarth (http://rodhowarth.com) for CLIENT
///
once you have done that, simply go to File > Export Template, and save it where you like. It will automatically be added to your Visual Studio templates. Access it again by going File > New Project > Visual C# (click on the heading) and then choose the template you named. Now you are all setup to start banging out some great Revit External Commands. I intend on blogging some more about the basic process as well as bits of peices of information I discover for myself along the way, in a bid to help increase the amount of Revit API help that is available online.

Wednesday, January 16, 2008

How to tell who is using a shared file (and how to close it!)

I've often had the problem, where a file is in use by an application somewhere on the network, and we can't find out who - as it needs to be deleted/renamed/opened properly etc. The way to do this: On the server with the file shared: - Go to start > Run > type compmgmt.msc - Under 'System Tools' expand 'Shared Folders' - Go to 'Open Files' That lists all the files in use by network users, right click on them and click 'Close Open File' to close it!

Thursday, January 3, 2008

Using Netlimiter to control speeds of computers internet connection over a network

Recently I've been on holidays, with my shiny copy of Call of Duty 4: Modern Warfare, I intended to spend a great deal of it relaxing, and shooting people online. Unfortunately, my little brothers and sisters are also on their high school holidays (which go for a great deal longer..) and want to watch videos of football and wrestling on youtube, and refresh their bloated Myspace pages. This means my ping spikes to 999 and my gaming fun ends.

I'd tried all of the bartering and negotiating, to no avail, I even pulled out the LAN for a bit, but I can't leave it out all the time. So I turned to Netlimiter, a program used for bandwidth monitoring and shaping.

I'd already been using RealVNC to close down bandwidth hogging applications on the other computers, so I used that to install Netlimiter. From there I simply went to View -> All Tools -> Permissions Editor, and then ticked 'Monitor' and 'Control' under the Guest account (you may like to assign it to a local passworded account).

Then on my Netlimiter, I went to View -> All Tools -> Remote Administration and entered the computer name, username as 'Guest', refresh time as 1000 & Automatic, clicked save, then clicked connect, entered no password for guest, and away she goes.

From there, you simply choose what to limit the connections down and upload speeds to:


To do this, I changed the units to KB from the dropdown, and set the limits to 4 download and 2 upload, seeing as I'm only on a 512kb connection. You might like to be more generous. You can then tick it on and off at your pleasure.

It's working a charm, I'm wasting my days playing games, my brothers and sisters haven't noticed (I even forgot to turn it off when I went away for the weekend - no complaints), everyone is happy.