# How to check if ArSim is activated during build

**URL:** <https://community.br-automation.com/t/how-to-check-if-arsim-is-activated-during-build/10048>\
**Category:** B&R Software & Runtime\
**Tags:** automation-studio, arsim, automation-studio-6\
**Created:** [February 6, 2026, 10:09am UTC](https://community.br-automation.com/t/how-to-check-if-arsim-is-activated-during-build/10048 "2026-02-06T10:09:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan.bachmann](https://avatars.discourse-cdn.com/v4/letter/s/FF8800/32.png) [@stefan.bachmann](https://community.br-automation.com/u/stefan.bachmann)\
**Post date:** [February 6, 2026, 10:09am UTC](https://community.br-automation.com/t/how-to-check-if-arsim-is-activated-during-build/10048/1 "2026-02-06T10:09:10Z")

</div>

Hello everyone,

Does anyone know if there is a way to check whether ArSim is activated or not during build events?

---

<div class="post-metadata">

**Author:** ![simon.buschor](https://avatars.discourse-cdn.com/v4/letter/s/FF8800/32.png) [@simon.buschor](https://community.br-automation.com/u/simon.buschor)\
**Post date:** [February 6, 2026, 12:50pm UTC](https://community.br-automation.com/t/how-to-check-if-arsim-is-activated-during-build/10048/2 "2026-02-06T12:50:33Z")

</div>

**An example with Powershell**

Pre-Build Step:

```auto
Powershell.exe -executionpolicy remotesigned -Command "& "'$(WIN32_AS_PROJECT_PATH)/Logical/BuildScripts/GetArSimStatus.ps1'" -ProjectPath '$(WIN32_AS_PROJECT_PATH)' -BuildConfiguration '$(AS_CONFIGURATION)'"

```

The script GetArSimStatus.ps1:

```auto
Param (
	[Parameter(Mandatory = $false, HelpMessage = 'Use $(WIN32_AS_PROJECT_PATH) in AS settings.')][string]$ProjectPath,
	[Parameter(Mandatory = $false, HelpMessage = 'Use $(AS_CONFIGURATION) in AS settings.')][string]$BuildConfiguration
)

# XPath Definition
 $xPathIP = "//ns:Hardware//ns:Parameter[@ID='Simulation']"

 # Hardware.hw Datei parsen und Simulationsbit auslesen
[xml]$xml = Get-Content -Path $([System.IO.Path]::Combine($ProjectPath, "Physical", $BuildConfiguration, 'Hardware.hw'))
$ns = New-Object System.Xml.XmlNamespaceManager($xml.NameTable)
$ns.AddNamespace("ns", $xml.DocumentElement.NamespaceURI)
try {
	$Simulation = [bool]$xml.SelectSingleNode($xPathIP, $ns).Value
	if ($Simulation) {
		Write-Output "Simulation aktiviert"
	}
	else {
        Write-Output "Simulation deaktiviert"
    }
}
catch {
	Write-Warning "Fehler beim Auslesen der Hardware.hw Datei."
}

```

The output

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/9/9bdfa6bd10272fc342d00c8fcfe39fc29c98fdcb.png)
