Sunday, March 1, 2015

CATIA Errors

Here are some tips to go with some CATIA errors that I have resolved.

OSM_VE004 : Cannot open document due to data storage versionning. 

This means that the file you are opening is newer than the Version of CATIA you are running.
In my case I opened the catpart in notepad and searched for LastSaveVersion
Next to that I found 5/21/4/
Since I was on V5R20, this told me that I needed to install V5R21SP4.

CATIA V5R21 will not find the LUM License Manager
CATIA now wants to use the DSLS License Manager, but you can force it to use LUM.

To tell CATIA V5R21 to use LUM, add this Enviromental Variable:
DSLICENSING = LEGACY
Read more »

Cannot delete TCP IP printer port because The requested resource is in use Die angeforderte Ressource wird bereits verwendet in Windows 8

I uninstalled a network printer under Windows 8, but the TCP/IP printer port was still in the list of printer ports. I tried to manually delete it form the ports list, but i got the error message "The requested resource is in use" (In german: "Die angeforderte Ressource wird bereits verwendet"). Reboot did not help.



How-I-fixed-it:
I found the right hints here: http://social.technet.microsoft.com/Forums/windowsserver/en-US/245c20bd-b6e1-4932-b91b-84fbd9767b41/can-not-delete-tcpip-printer-port-when-deleting-the-printer-on-windows-2008-server?forum=winserverprint

1. Open the registry Editor "regedit.exe"
2. Navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlPrintPrinters
3. Is the Printer deleted recently still listed there? If yes, delete the according entry in the registry
4. Restart the Spooler Service
5. Delete the TCP/IP Printer port.

P.S.
I did this, because our Network admin changed the hostname of a HP Color LaserJet 4650dn Printer and i had to re-install it on my computer.
Read more »

Cant open sqlproj with Visual Studio 2012 Install SQL Server Data Tools

I recently updated to Visual Studio 2012 Ultimate.
When i tried to open an existing SQL Server SQLCLR Project (*.sqlproj), it says that the sqlproj is incompatible with the version I am running.

How-i-fixed-it:
 
 
I installed the SQL Server Data Tools from http://msdn.microsoft.com/en-us/data/tools.aspx.

I found the solution here:

http://stackoverflow.com/questions/11906691/visual-studio-2012-csproj-and-sqlproj

and here:
http://www.comoke.com/index.php/2012/10/visual-studio-2012-database-project-sqlproj-project-type-not-supported/

and here:
http://blog.tentaclesoftware.com/archive/2013/02/11/visual-studio-2010-and-2012-sqlproj-interoperability.aspx
Read more »

C HRESULT comparison

Thanks to Rick Strahl for this great blog entry that saved me a lot of time solving a COM Interop issue:


COMException exposes this HRESULT as an int value in the Exceptions ErrorCode property. Now in my brain freeze haze I tried something like this:

try{ this.OutputBuffer = this.ComInstance.GetType().InvokeMember("ProcessHit", BindingFlags.InvokeMethod, null, this.ComInstance, new object[1] { this.CompleteInputBuffer }) as string;}catch (COMException ex){ // *** RPC Server Unavailable if ( ex.ErrorCode == 0x800706ba ) { // try to reload the server if (this.LoadServer()) return this.CallComServer(); } this.ErrorMessage = ex.Message; return false;}catch (Exception ex){ this.ErrorMessage = ex.Message; return false;}finally{ this.EndRequest();}

Now that seems like it should work well enough right?

Eh, not quite. The problem is that the constant hex value is created as a uint while the HRESULT is a signed integer. The code compiles just fine but at runtime the comparision may fail (depending on the HRESULTs actual value - high values like the one above (and arent just about all COM errors 0x800... ) will fail.

So quick - how do you create a signed hex constant?

I dont know, but this works as expected:

if ( (uint) ex.ErrorCode == 0x800706ba )
Read more »

How to update Linq to SQL dbml database layout in Visual Studio 2012

I have not been working with the Linq to SQL tool before and had to make some changes to an existing Visual Studio 2012 project. Some new colums were added to a database table and i needed to update the corresponding dbml file in the Visual Studio project.

How-i-fixed-it:
I found the solution here: http://stackoverflow.com/questions/1110171/how-to-update-linq-to-sql-dbml-file

Delete the modified tables from the designer, and drag them back onto the designer surface from the Database Explorer. I have found that, for this to work reliably, you have to:
a. Refresh the database schema in the Database Explorer (right-click, refresh)
b. Save the designer after deleting the tables
c. Save again after dragging the tables back.
Read more »

3CX Drops support for Polycom and Grandstream

It looks like as of Version 12, Service Pack 3, that 3CX has dropped support for Polycom and Grandstream phones.
The phones no longer show up in the Phones area as Provisioned making it impossible to reboot or provision them from the console.

A discussion about this can be found on the 3CX forum here:
http://www.3cx.com/forums/polycom-phones-show-as-unprovisioned-38477.html



This article http://www.3cx.com/support/polycom-phon ... hallenges/ contains reasons why 3CX doesnt want to support Polycom phones anymore.

Time to find a new PBX or is this just a bug?
Tell me what you think in the comments.

Our 3CX Background:
Skills Inc has 250 Polycom SoundPoint phones connection to a 3CX PBX.
The phones all connect to one Hyper-V Virtual server over a Fiber Optic WAN from 3 locations.  We have a Comcast PRI that connects to a Patton Gateway for our main trunk.  We use Grandstream FXO GXW4104 gateways to connect analog lines to the 3CX at each location for 911 calls.
Read more »

Finding chord names for given notes

Today i had to find the chord names for some notes on my keyboard. This great tool helped me:
http://www.sengpielaudio.com/Akkord-Benennung.htm
Read more »