When you make something that can bring down powerful people – powerful people will pay attention to you


Using COM Automation to quick-start Bentley Maxsurf v18

The latest version of Maxsurf is Bentley Maxsurf V18i. You can download this version from Formsys and Bentley site, in which you’ll get a 15-days fully functional trial version. Afterwards, you can purchase the license via Bentley Select Licensing. If you’re from Malaysia, you can get the license from Caidmark Sdn Bhd.

Okay let’s jump into the good stuff. If you are using the Trial Version, you’ll be:

1. Notified each time by a pop-up which check your license’s status,

2. clicking the trial button,

3. clicking the selection of hull and,

4. finally arrive at the design space.

An awesome person (like you and me) will definitely automate these actions and go fishing. The step will be shorten to:

1. Clicking our newly-made programme, and
2. Voila there goes our design space!

You’ll be using Autoit V3. Make sure you get familiar with the software (approximate time: 10 minutes). It is basically a programme to automate your action in Windows. However you can also use it to write complex programme. It’s basically based on BASIC programming language. (Wow, 2 puns in one paragraph!)

1. First, you’ll need to copy-paste the codes below. Take note that the path of my Bentley Maxsurf is default.

2. Save it somewhere in a folder (not in the desktop, Windows permission doesn’t like this behaviour, Windows will probably kill your cat).

3. Compile it to EXE (using AutoIt compile function)

; Maxsurf Start
; by: Dr. Ahmad Faisal Mohamad Ayob
; 21 July 2012

; Initiate COM object of Maxsurf within our programme
$oMaxsurf = ObjCreate("Maxsurf.Application")

; Run EXE path of Maxsurf Modeler Advanced 64 bit
Run ("C:Program FilesBentleyEngineeringMaxsurf 18 V8iMaxsurfModelerAdvanced64.exe")

; Wait for Licensing Options -> Choose default (Trial) and send {Enter}
WinWaitActive("No License Found")
Send ("{ENTER}")

; Wait for Maxsurf Quick Start hull options and send {ESC} to invoke the default design space
WinWaitActive("Maxsurf Professional Quick Start")

Voila! You’ve just finished your first automation programme! (Well technically it’s mine, but I gave it to you, you’re welcome).

What we are expecting is, once you clicked your programme, it will do all the clickity-clack above and brings you the design space.

Happy coding!

p/s: You want to have the final compiled EXE? Grab it here.

The answers to why having more money is better, and why flat tax is bad

The less money you have, the less effectively you can use it, and this scales all the way up. If you make enough money to afford a car, you don’t have to go to the cheap grocery store across the street, and can head to one with better prices that’s out of walking distance. If you make more, you might be able to afford a Costco membership, and buy your groceries in bulk sizes, which is a lot cheaper. And maybe you can trade in that wrecked used car that was all you could afford before for something that gets more MPG and doesn’t require costly repairs every six months. And instead of buying a cheap pair of sneakers you’ll have to replace in a half a year, you might be able to buy yourself a decent pair of shoes that’ll last you a few years. In many cases, you end up paying less in the long-run by paying more in the short-run.

So having more money means you can use it more effectively, giving you more bang for your buck. But it also gives you more opportunity, and not just opportunity to lead a better life, but more opportunity for upward-mobility.

Think of the costs associated with getting a job. To work in fast food, you presumably need some clean clothes, maybe a bus pass. To be able to shop around for a better employer, you’ll need decent, reliable transportation. To get a better job, you might need better clothes, a cell phone, a computer with an internet connection… and moving up the scale, you need a college education… and for that, you’re looking at tuition, books, and the costs associated with spending the amount of time it takes to get through college without a well-paying job.

If you can barely afford the clothes on your back, you’ll be lucky to be earning minimum wage… and maybe after a few years of scrimping and saving, you’ll be able to get a car, and have some slightly better options. If you have a decent income, you have a much better opportunity to get a college degree in a high-paying field, or work your way up the corporate ladder.

That’s not even getting into the facets of your life that indirectly affect your job opportunities. If you’re wealthier, you have better legal options, which means that you’re less likely to be convicted or spend time in prison, even for committing the exact same crime as a poor person. You have better medical coverage, which means less time spent having to call in sick to work, and being more fit also makes you a more appealing job candidate. There are even some ties between level of income and access to a nutritional diet – low-income folks generally eat worse food because they can’t afford to buy healthier food.

This isn’t a fluke. It’s how money works – the more of it there is, the more powerful a force it is, even proportionally, and the easier it is to get more of it.

However, there’s another side to this too. The more money you have, the more expendable any portion of it becomes, even proportionally-speaking.

Let’s look at three guys, Allen, Billy, and Charlie. Allen makes $20K a year, Bill makes $200K a year, and Charlie makes $2 Million a year. Each is taxed at 10% of their income… but as need to happen sometimes, the taxes need to go up. Let’s say they double, so it’s 20% now – the same for all three, right? Hell, it’s harder on the richer, because they’re paying more money than the poor guy! But in actuality, it’s the poor guy who’s sacrificing the most because of this, because so little of his income is expendable. Now Allen needs to decide between paying the rent and paying for food. Bill needs to hold off on that family vacation to Europe he’s been planning. And Charlie… well, Charlie will gripe about the number in his bank account being less than he’d like, and then he’ll go and buy his twelfth Ferrari anyway.

That money you supposedly “own” isn’t even really property, it’s an idea used to facilitate the operation of a healthy society, and it does so by making an easy, simple conversion of property into a common exchange value. But since its very nature is uneven and broken, it needs to be addressed as such. And since a 10% tax hike on someone earning $20K is not the same as a 10% tax hike on someone earning $2 Million, for the many reasons I’ve just stated, we have progressive taxation, where the wealthier you are, the greater a portion of your income you contribute in taxes.
To take this to an extreme, if there was an across-the-board tax of 50%, with wages in America what they are now, the wealthy would still be living comfortably, the middle class would be scraping by… and the poor would starve to death. Treating everyone the same is not fair.

Republicans and those aligned with them like to paint this in a way that’s essentially “ganging up on the rich people”, “punishing” them for “success”. However, if you treat everyone the same, make everyone pay a flat tax rate, then you are punishing the poor, who are less able to afford it. And it’s easy to point at the numbers and turn them into a picture that shows the terrible burden the wealthy have to pay thanks to progressive taxation… but the truth of it is, the reality those numbers translate into is one where the wealthy can afford to contribute more, without any noticeable change to their lifestyle, and it’s not just because they have more to give, it’s because the fact that they have more makes them less dependent on it, better-able to acquire more of it, and less affected by its loss (again, even by proportion).

That is why any reasonable capitalist society taxes the rich progressively more than the poor. It’s not to “punish” anyone for success, it’s because the nature of money makes it far more invaluable by proportion to the poor than it is to the rich.

via [Link]