Knowledge Base

KB10944 - PowerShell and DK for ActiveX edition.

It is possible to use the Developer Kernel for ActiveX edition within PowerShell.

Doing this requires that a 32-bit (x86) version of PowerShell be started.

Sample code:

$utils = new-object -COMObject "TatukGIS_XDK11.TGIS_Utils"

#create a viewer and draw a map
$vwr = new-object -COMObject "TatukGIS_XDK11.TGIS_ViewerBmp"
$vwr.SetSize( 512, 512 ) 
$vwr.Open( "c:\Users\Public\Documents\TatukGIS\Data\Samples11\World\WorldDCW\world.shp" )

#save map to the disk
$bmp = new-object -COMObject "TatukGIS_XDK11.TGIS_Bitmap"
$bmp.NativeBitmap = $vwr.Bitmap 
$bmp.SaveToFile( "c:\tmp\out.bmp" ) 
Created: October 31, 2019, Modified: February 21, 2020