Ad

Monday, March 10, 2025

WPF Strings to Search for Localization

I used this list of string values to help find places where localization strings need to be used instead of hard coded values.

Title="

Header="

Text="

Content="

ToolTip="

Friday, October 18, 2024

Units - International Feet and US Survey Feet

 Bizarro world remains for the software company. When you add features should you expect everyone to change their behavior? What do you do with legacy drawings? Should the software company actually make sure their own features work with the new feature? 

If you are Autodesk that is a resounding NO! Ignore the new feature and wonder why users are complaining. 

In this case the software providers have provided support for "Feet" (which was the only option for decades) and then added an option for "US Survey Feet". Unfortunately, if you export to IFC Civil 3D doesn't read the drawing units. The feature defaults to "International Feet" instead of "US Survey Feet". 


You can see that in line 13 of the output files (note yours might be different). That the conversion factor from feet to meters is set to "Internation Feet" instead of using the appropriate factor. 

To fix this you can modify the text files with the desired value of conversion. In this case the desired value should be 39.37 inches per meter or 0.3048006096012192


 

Then when you import the file into another drawing, as long as it reads the factor, it should import in at the desired location instead of being scaled incorrectly. 



I haven't tested Civil 3D 2025, but Map 3D also has issues recognizing "US Survey Feet" for most of the commands in Civil 3D 2024 and prior drawings. These were reported to Autodesk, but like most bugs I don't think they cared to fix them. As bugs to be fixed are bugs to be ignored.

The help file indicates it supports US Survey Feet, but I'm not seeing that in practice on the export. 



Saturday, September 21, 2024

Digicert Click-to-sign tool setup

 I forgot to remember how to set up DigiCert Click-to-sign tool setup. So here is the dialog box filled out with the working values. 


The pkcs11properties.cfg is a small file. 

name=signingmanager 

library="C:\Program Files\DigiCert\DigiCert Keylocker Tools\smpkcs11.dll"

slotListIndex=0

 Go here to the KeyLocker workflow:

Then go through the Get Started workflow.


Set the paths to the to Keylocker tools and the SignTool.exe, or one can do it from the System Environment dialog box in Windows 11.

set PATH=%path%;"C:\Program Files\DigiCert\DigiCert Keylocker Tools"

set PATH=%path%;"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64"

set PATH=%path%;"C:\Program Files\Java\jdk-23\bin"

The Keylocker Windows Clients Installer:


Once complete: 



Here is the command line stuff: 
If you use the command line options, it appears one has to restart the computer for the changes to be accepted.


Wednesday, September 18, 2024

PropWPF Code Snippet

 Steps to add a code snippet in Visual Studio for use as adding a WPF property. 

Go to Tools, Code Snippets Manager

Select the desired language


Click on the Visual C# folder to see the existing snippets. 

Copy the propfull.snippet to the My Code Snippets location and rename it to the desired shortcut. In my case propwpf.snippet.

Modify the snippet to the desired format: 


In this case this is the snippet text: 

<?xml version="1.0" encoding="utf-8" ?>

<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">

<CodeSnippet Format="1.0.0">

<Header>

<Title>propWpf</Title>

<Shortcut>propWpf</Shortcut>

<Description>Code snippet for property and backing field</Description>

<Author>Microsoft Corporation</Author>

<SnippetTypes>

<SnippetType>Expansion</SnippetType>

</SnippetTypes>

</Header>

<Snippet>

<Declarations>

<Literal>

<ID>type</ID>

<ToolTip>Property type</ToolTip>

<Default>int</Default>

</Literal>

<Literal>

<ID>property</ID>

<ToolTip>Property name</ToolTip>

<Default>MyProperty</Default>

</Literal>

<Literal>

<ID>field</ID>

<ToolTip>The variable backing this property</ToolTip>

<Default>myVar</Default>

</Literal>

</Declarations>

<Code Language="csharp"><![CDATA[private $type$ $field$;


public $type$ $property$

{

get { return $field$;}

set { SetProperty(ref $field$, value);}

}

$end$]]>

</Code>

</Snippet>

</CodeSnippet>

</CodeSnippets>


Sunday, April 07, 2024

Trimble Access Development

  • Ask for access from Trimble and install Trimble Installation Manager and include the API
  • Add Android path to the "PATH" system environment. The path should be checked to make sure it is correct. This will make it so the code will compile. It might be a setting I missed, but if Visual Studio indicates it can't find something, then add the path to the file locations. 
    C:\Microsoft\AndroidNDK64\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\
  • Modify Visual Studio for Android and Windows development for c++ if it doesn't already exists. 
  • If the install is on a server, install Wireless LAN from the Server Manager program, You know this is required if starting Trimble Access emulator says it can't find the "WLANAPI.dll" file. 
    https://www.youtube.com/watch?v=Mq6xhtiZeKM&t
  • If you make a mistake, make sure to clean and then rebuild. Otherwise, it will not copy all of the files properly. 
  • If there are copy file errors, then change the post build event to use "ByPass" instead of "unrestricted"
    powershell -executionpolicy ByPass -file "$(ProjectDir)CreateTimXml.ps1" -outfile "$(OutDir)$(TargetName).timxml" -lib "$(TargetFileName)" $(TimXmlProperties)

    • You might need to restart your computer and/or restart Visual Studio to get the projects to build and possibly clean the project and then build the code. Stuff appears to get cached which prevents things from working correctly using c++.

    LinkWithin

    Blog Widget by LinkWithin

    Ad