NAVDEMO / RenumberNavObjectIds

Renumber Nav ObjectIds
5 stars 10 forks source link

How it works #8

Open Steven-Bale opened 4 years ago

Steven-Bale commented 4 years ago

Hello, I tried to make your tool works but I can't anf the link is broken. Could you explain please ?

Thanks Steven

freddydk commented 4 years ago

I don't know what happened to that blog post - it was somehow deleted. I do not have a local copy, sorry.

rvanbekkum commented 4 years ago

The following page brought me here, maybe that helps: https://github.com/microsoft/ALAppExtensions/blob/master/FAQ.md

You can renumber objects in several ways. The following steps describe one of them.

Get the RenumberNavObjectIds tool from https://github.com/NAVDEMO/RenumberNavObjectIds. Clone the project and open it in Visual Studio 2015. Build the project, and you are off to a good start. Run the following PowerShell Script in PowerShell ISE:


Import-module "C:\...\RenumberObjectIds.dll"  
$RenumberList = @{}  
0..1000 | % { $RenumberList += @{ (1800+$_) = (80000+$_) } }  
0..20 | % { $RenumberList += @{ (136630+$_) = (82000+$_) } }  

Renumber-NavObjectIds -SourceFolder "C:\...\C52012DataMigration\" -DestinationFolder "C:\...\C52012DataMigrationReID" -RenumberList $RenumberList -Verbose```

So, what is done in the example is the following:

  1. Load the PowerShell cmdlet Renumber-NavObjectIds from the RenumberObjectIds.dll DLL.
  2. Create a HashTable (RenumberList) that maps original object IDs to new object IDs, e.g., 1800 -> 80000, 1801 -> 80001, 1802 -> 80002, and so on for 1001 successive IDs, but also 136630 -> 82000, 136631 -> 82001, and so on for 21 successive IDs.
  3. Run the cmdlet for renumbering specifying the folder with the original files (SourceFolder) and the destination folder for the new renumbered files (DestinationFolder).