20 August, 2018

How to Download Autodesk Revit 2016 or Other Previous Versions

How to Download Autodesk Revit 2016? Other Previous Versions? I was trying to search the web on how to do just this thing, but all I found are either Help Content, or anything but not the installer. And if I ever did, I am always directed to Autodesk Revit 2019, the latest version.

Not what I wanted.

Many days I tried, and then one day, I simply managed to do it: download Autodesk Revit 2016. Previous version, that is! And in my joy I proceeded to do the installation right away. Oh boy, I did not take note of how I did it. Bummer!

So when the Designer guy was having some problem with one of the tasks he is testing, being advised that Autodesk Revit 2019 does not currently have the feature, with Autodesk Revit 2016 suggested as having the working function of linking to a database, export and import data, the hunt for Autodesk Revit 2016 began. And even when that earlier version was already installed, and he resumed his tests, some other problems came up.

After checking with the local distributors, we were advised that SQL Server 2014 isn’t supported yet. And no, we have ruled out Access database. It does not fit the current infrastructure that we deploy to clients, besides Access is not scalable.

Okay, so we were told that the supported version for making Revit dB link function is SQL Server 2005, 2008 and 2012. And 2008 and 2012 gave the same dB link error as SQL Server 2014. Not supported, eh? Beats me.

So now what I needed to do is check on the dB link issues on my own. So began the dilemma of the second phase of how to download Autodesk Revit 2016 (previous version).

I did the usual search, and it is really frustrating. I even found solutions and resolutions when encountering error during Revit installation, specifically on 2016 version, but all of these are not what I want. I want the installer!

The keyword ‘Autodesk Revit 2016 installer’, or web install variant, or the likes, always lead to the same search results – but then again, not the installer itself. Then someway, somehow, it dawned on me, why not try ‘Autodesk previous version’? And I did just that.

Eventually I was directed to AVA, Autodesk Virtual Agent, where some account sign up was required, and I went through the very simple question and answer step, and I was given the link to the installer quickly. You will be given [Download Now] or [Browser Download]. The former uses Autodesk’s Download Manager, and the latter, well, your browser (Part 1 and Part 2 links).

So there you have it. And in my curiosity, I tried directly going to Autodesk Virtual Agent using another PC, and I was not required to log in. That means without an account. I just typed in my queries and replies, and the exact same results I got: the links to the installer.

Now you know. How to download Autodesk Revit 2016, or any other previous versions.

Try it!


(Drafted on 02-August-2018)

20 July, 2018

How to Change Font in Android Phone (Huawei Mate 10, Samsung)

20-July-2018

After my Samsung Note 3 phone, I got a Huawei Mate 10 smartphone as my new daily driver. And it was a total change for me after using Samsung phones so long. (3310, xxx, xxx, Note 2, Note 3). And while custom ROMs is easily available for the Samsung brand, it is not the same case for Huawei Phones.

What's more, Samsung phones are sturdy and incredibly adamant and can take a lot of beating. They can be revived even after an apparent bricking. Not so with Huawei Phones. At this stage, they are still finicky and sensitive, that the slightest mistake or incompatibility will brick a Huawei phone, and render it useless.

Well, I got my Huawei Mate 10 phone at $0 cost, as I renewed my plan, and it so happened that it was on a Good Friday, I was just browsing on what's a possible replacement for my Note 3 phone, and there it was, presenting itself so clearly: a Huawei Mate 10 phone at $0 cost.

I grabbed it, and after 7 days of hesitation and restraint, I proceeded to root it. For the whole week, though, I was searching, browsing, and reading articles and forums, so I have had some good and bad points. But you know it. Being so acclimated to a rooted phone, owning a trendy and high-tech unit is pointless -- if it is not rooted! At least that is the case for me.

So I went on to root my Huawei Mate 10 phone, carefully, using ADB method, and I succeeded. Once TWRP is flashed and applied, the rest are just normal and stable flashing (Magisk, and Full OTA updates).

Then there was my passion for fonts that took hold of my attention and didn't let go, didn't let up until my eyes said 'enough'!

And no, it isn't that easy. You see, all that I ever have done is root the phone and ROM is still stock. So many of the apps still won't run as they would on Samsung phones.

Below is how I changed the fonts on my Huawei phone.

1. Use Launcher. I use GO Launcher Ex, and this to some degree gave some desirable font change effects.

2. Use Apps, like iFont, MWFonts, FontFix, TypeFace, Fontster. I use iFont primarily in my Samsung rooted phones, and they never failed to just use the selected font, standard or customized. I did use occasionally the other apps, but my de facto app is iFont.

3. Use ADB Method. This is opening up adb in PC, connect to your phone with elevated access, go to /System/Fonts, then change Roboto-Regular.ttf with the phone that you want. That means the current Roboto-Regular.ttf you rename first or back up, then the new phone that you want to flash, you rename into Roboto-Regular.ttf, then you flash it (copy into the /System/Fonts folder).

4. Use ES File Explorer
This is basically the same as method #3, but more manual. You copy the custom font to /System/Fonts folder. Then you rename existing Roboto-Regular.ttf. Then you rename custom font to Roboto-Regular.ttf. In this method, however, you have a chance to preview the new Roboto-Regular.ttf file. What's the importance of this? If you can preview the new Roboto-Regular.ttf file, you are sure that your phone will be okay. Otherwise, your phone will go into what is called soft brick. Don't risk it!

5. Use iFont
Specifically for Huawei Mate 10, which is running a stock ROM, just rooted, applying a new font results into a new theme, then you apply that theme. In my experience, this isn't working 100%. Sometimes it does, but most of the time, it doesn't. Because you apply the theme, then you reboot. it is just disappointing not to see the new font once the phone is booted up. So I stopped using this method.

6. MWFonts, Fontster, TypeFace, FontFix
For these apps, in Samsung or Huawei phones, Applying a new font works 100%, however, the selection is limited to their own font sets, no custom fonts. Only iFonts have that custom fonts feature. Or maybe for paid versions. I use mostly free versions.

What works for me:
I apply new fonts 2 times:
1. Use MWFonts, Fontster, TypeFace, FontFix - this goes to headers and titles.
2. Use ES File Explorer manual method. This goes into the text body.

By the way, when customizing fonts, which is just making them thinner, or fatter, or taller, or narrower, or shorter, I use High-Logic's FontCreator software on my desktop PC, then copy the modified .ttf file to my phone. That way I can do a font preview on my desktop and make comparisons. But the real test is when the new font is applied to my Huawei Mate 10 smartphone.

Hope you learned something new today.

Till then!


[Drafted on 01-Jun-2018]

20 June, 2018

Deploying a Web Application using IIS, HTTP Error 401.3 Solved

IIS 7's redesigned management console
IIS 7's redesigned management console (Photo credit: Wikipedia)
Deploying a web application using IIS in Windows was a problem for me after I have completed the task of developing the web app. Publishing it is easy following the File System or FTP method. And there are many articles that you can find on the web telling the same thing.

So why doesn't the web application run right away?

Here's my application structure:
The simple web application I created used bootstrap and CSS, and some jQuery and Javascript functions. It uses some database tables running in MSSQL Express. Now if I remember, I have set up my MSSQL Express to run on mixed authentication mode.

I checked my connectionstring values, and everything seems to be in place. In fact, I am able to perform web application deployment smoothly. Only that I get into an error when I click on a page that accesses the database. Even just querying data and no transactions yet.

I asked a fellow developer, and I was told to add in a logger. That is to help me identify what wrong thing could be happening that isn't normally seen or shown.

But I didn't do that. I am already so close and getting impatient. All static pages working, and only those dependent on the database have issues. I was near to pulling my hair!

But my patience took the better of me. I continued searching, and I found some more articles, randomly, which I tried one by one.

That fixed the issue, and I was able to run the web application if full spectrum.

Here's what I have done, and hopefully, it would help others, too.

1. The usual web application deployment methods, but in my case, File System.
2. In particular, I get HTTP Error 401.3 - Unauthorized: Access is denied due to an ACL set on the requested resource.

Now remember, MSSQL Server was set up using mixed authentication mode, so I have sa account and also Windows account. The latter is the key. Windows account is not authorized, so database access fails.

What's the fix?

Open up IIS Manager (type 'inetmgr' in Cortana/search box).
Open up Sites, then click on the Web Site you are fixing.
In the middle pane, under IIS section, double-click on Authentication.
Right click on Anonymous Authentication, then select Edit.
Instead of Application pool identity, select now Specific user and specify IUSR (or IIS_IUSR).
(In some cases, selecting Application pool identity would do the trick.)
Click on Set and enter the credentials, if needed.
Then OK.

Now go back to the folder where the web site is deployed and give proper priveleges for the IUSR account. For my case, that is what fixed the problem. So I'm logging this discovery via my blog.

Anyway, if this doesn't work, it is 99.99% an issue of the account being used to access the database that is the cause, so just play around these settings. So much so if all static pages already work.

Hope it helps others, too.

Till then!

23 May, 2018

Enable the Design and Split Buttons in Visual Studio

23-May-2018

The ActiveReports designer as it appears in Vi...
The ActiveReports designer as it appears in Visual Studio, with important areas labeled. (Photo credit: Wikipedia)
Enable the design and split buttons in Visual Studio. That was something that I needed to do about a month ago as I was tasked to create a small web application, a submodule of a bigger application. But only source view is enabled and is the default.

So how to enable it?

2 ways:

First Way:
Click on File >  New > File
Choose General on the left pane, then HTML Page at the middle pane.
At the bottom right area of the New File dialog, click on the down-pointing arrow beside Open.
Click on Open With.
Select HTML (Web Forms) Editor, then on the right side, click Set as Default.
Click on OK.

No, that may not show the Design | Split | Source buttons yet. You need to restart Visual Studio first.

Second Way:
Click on Tools > Options > Web Forms Designer
Make sure box on Enable Web Forms designer is ticked.
Start pages in Source View, Design View, Split View, you choose that.
Click on OK.

Again, that may not show the Design | Split | Source buttons yet. You need to restart Visual Studio first.

Hopefully, one of these methods would enable the design and split buttons in your Visual Studio.

Till then!

25 April, 2018

Forcing A Windows Application To Quit On Exit

English: Graphic which hints to Microsoft Windows
English: Graphic which hints to Microsoft Windows (Photo credit: Wikipedia)
25-April-2018

Forcing A Windows Application To Quit On Exit. That was my recent problem with a Windows Forms Application I was finalizing for deployment. It is not a big program. And it is not even one that is complicated. Straightforward and simple. That's what it is. But somehow, it carried a bug.

The .exe isn't terminated by Windows. It remains in the system. I can see it using Task Manager. And how did I find out about it? I am not able to execute a Ctrl-F5 properly. I always get an error.

That is when I started checking here and there, and I found out, the program's .exe remained in the system even after I close the program. Why is that? Beats me!

I opened one of my Windows Forms program, compared the code side-by-side, and no, there is nothing different. It is the same lines of code for the 2 programs, but the former closes and system disposes of everything. The latter, no. the Form closes, but the .exe remains in the system. So I can't start a new program since to the system, it is 'still running'!

Why it behaves that way, I do not know.

Now, I said this is a piece of cake. It is easy. I know how to terminate a program so that it is removed from the Taskbar. I was thinking that the same trick should work on this new program. I mean, why shouldn't it?

But I was wrong. It did not work! How can Visual Studio codes be so quirky?

Anyway, I did some direct codes, testing a few lines a couple of times. And guess what? Here's what worked:

Application.DoEvents();
if (Application.MessageLoop) {
    // WinForms app
    Application.DoEvents();
    Application.Exit();
}
else {
    // Console app
    Environment.Exit(0);
}

That 'if' section, it is meant to be for Windows Forms applications, and the 'else' clause, that is meant to be for non-Windows forms programs, like a Console application. That's the 'normal' way of things. Supposedly the 'right' logic.

But wait.

After trying it the normal way, it didn't work. So I tried it the extra-normal way: use Environment.Exit(0) in my Windows Forms application. And you'll guess it already. It worked!

I guess that is an experienced programmer's edge over the newbie. Not all the time, things work normally. And when it happens, the veteran knows how it is done rightfully, or maverick.

So I hope that you have learned a new thing today: Forcing A Windows Application To Quit On Exit.

Till then!


[Drafted on 26-March-2018]


11 April, 2018

Prevent Leaving An Icon In System Tray On Program Exit

The Windows 7 taskbar shows a preview of the w...
The Windows 7 taskbar shows a preview of the window. (Photo credit: Wikipedia)
11-April-2018


Prevent Leaving An Icon In System Tray On Program Exit. I had a problem with one of my applications about this. I was able to minimize it to System Tray. The App Icon was removed from the Taskbar, alright. But when the application was restored and closed, the icon remains in the System Tray. What's worse, I didn't notice it!

This was complicated by the fact that I did a routine cycle of closing and opening the program using scripts and some free apps downloadable from the internet, so that for a period of time, System Tray was filled up with icons of the same program, all N-1 of which are invalid handles!

I got a good scolding from my boss about this. Why? When I researched this problem, I found out that it is a prevalent issue. There are a number of forums that discusses the same exact problem, as obviously, I am not the only one having it. No, I am not the first one, and I will not be the last.

What did I find? That it was, and it remains, an issue by MS. Yep. The software giant company MS. They have it as a bug, and it still isn't fixed. The full details, I cannot tell here. But if you are interested, and if it happens to you in the future, you will know and understand what I mean.

Of course, there were suggestions presented in the forums to remedy the situation, and some of them I actually followed. Unfortunately, they didn't work perfectly for me. That is why so many icons still get left behind. And worse, this was implemented in one of our customers. Customer complain, that is what I got. That is how I got a good scolding. What's the point? I followed and applied in my code something that is 'wrong'. Yeah, I kinda missed that.

Anyway, how was that problem remedied?

This is the surprising this. It really is very simple, and it isn't something hidden.

In the FormClosed event, put (or add) these lines:

myNotifyIcon.Icon = null;
myNotifyIcon.Dispose();
Application.DoEvents();
if (Application.MessageLoop) {
    // WinForms app
    Application.DoEvents();
    Application.Exit();
}
else {
    // Console app
    Environment.Exit(0);
}

Surprising, isn't it? You gotta try it to know it! And with that, You should be all set. Prevent Leaving An Icon In System Tray On Program Exit.

Till then!

[Late posting; drafted on 18-October-2017]


28 March, 2018

Make App Disappear From Taskbar On Minimize

Screenshot showing Windows 8's ability to pin ...
Screenshot showing Windows 8's ability to pin apps and show different wallpapers on different monitors, as well as displaying the new Explorer file browser interface, Task Manager, and multi-monitor taskbar (in "Duplicated on all taskbars" mode). (Photo credit: Wikipedia)
28-March-2018

I wanted to completely hide an application after it is minimized. Hide() is not enough. [ShowInTaskbar = false] did the trick.

Well, I could say that I struggled a bit finding out what would really make the application disappear from the taskbar.

I used Hide(). Didn't work. I also tried Visible = false. Also did not work. I combined both, but still, it did not work. I combined both Hide() and Visible = false, and even then, I still did not see the job done. App icon still shows in the taskbar when it was minimized.

I should mention that I already have the application creating an icon in the System Tray as I have previously created a NotifyIcon to handle that. And what I am adding now is to minimize the window via code, which also requires the app icon to be not shown in the Taskbar.

I couldn't find many articles that provided help. What came up usually just mentioned Hide() or Visible, and some of the old stuff about adding a NotifyIcon function. I found one that did mention about making use of the property ShowInTaskbar. So I grabbed that one-liner code, tried it, and it worked!

So now my program is complete! Now I can hide an application after it is minimized. Thanks to ShowInTaskbar, I could declare it a holiday!

Till then!

[Late posting; drafted on 04-October-2017]