Skip to content

Instantly share code, notes, and snippets.

@slydlake
slydlake / Default.ps1
Last active November 27, 2024 09:54
[VDS change Properties by command VDS Copy] #VDS
function SetWindowTitle
{
$mWindowName = $dsWindow.Name
    switch($mWindowName)
  {
   "InventorFrameWindow"
   {
    $windowTitle = $UIString["LBL54"]
   }
   "InventorDesignAcceleratorWindow"
@slydlake
slydlake / CDN_CAD_FUNCTIONS.ps1
Created October 18, 2021 14:35
[VDS Eigenschaft auf NULL prüfen] #powershell #VDS
#Erzwinge roten Rahmen, wenn Eigenschaften leer sind
#Gilt nur wenn Eigenschaften NICHT im Dynamic Grid sind
$CheckProperties = @("Description")
CheckPropertyNull $CheckProperties
@slydlake
slydlake / CDN_CAD_FUNCTIONS.ps1
Last active October 18, 2021 14:35
[Erstellt von/am setzten beim speichern] #powershell #VDS
#Erstanlage setzen
AddHandlerCreateMode
@slydlake
slydlake / CDN_CAD_FUNCTIONS.ps1
Last active October 18, 2021 14:37
[Copy Modell Props to Drawing] #powershell #VDS
#Bei Zeichnungen werden die Modell Eigenschaften der Vorlage kopiert
if ($Document.DocumentType -like "12292") { #entspricht kDrawingDocumentObject
CopyModelProperties
}
@slydlake
slydlake / Customer.ps1
Created December 1, 2020 06:44
[CIDEON DLL in other Powershell context] #powershell #VDS
$global:CIDEON_GENERAL_TOOLS = New-Object -TypeName CIDEON.GENERAL.TOOLS.CIDEON_GENERAL_TOOLS
$global:CIDEON_VAULT_DOCUMENT_TOOLS = New-Object -TypeName CIDEON.VAULT.DOCUMENT.TOOLS.CIDEON_VAULT_DOCUMENT_TOOLS($VaultConnection)
$file = $CIDEON_VAULT_DOCUMENT_TOOLS.CDN_GetLatestFileObjectByMasterFileID($selected.Id);
@slydlake
slydlake / CAD.Custom-CDN_STOCK.ps1
Last active October 26, 2021 08:53
[Folder Props to File Props] Save Dialog Inventor/Vault #VDS #powershell
#retrieve property value given by displayname from folder (ID)
function CDNGetFolderPropValue ([Int64] $mFldID, [STRING] $mDispName)
{
$PropDefs = $vault.PropertyService.GetPropertyDefinitionsByEntityClassId("FLDR")
$propDefIds = @()
$PropDefs | ForEach-Object {
$propDefIds += $_.Id
}
$mPropDef = $propDefs | Where-Object { $_.DispName -eq $mDispName}
$mEntIDs = @()
@slydlake
slydlake / MenuDefinitions.xml
Created November 25, 2020 13:28
[VDS Open URL] #VDS #powershell
<?xml version="1.0" encoding="utf-8"?>
<!--
Label: Label string for the command, must be quoted
Description: Description text for the menucommand. Must be quoted
Hint: Hint string, must be quoted
PSFile: Name of the *ps1 file that contains the powershell script to execute when the menu command is invoked, value must be quoted.
Image: Name of a bitmap file that contains the image for the menu command. Image should be 16x16 or 32x32, value must be quoted.
ToolbarPaintStyle: Controls how the item is drawn on toolbars, values are Text, Glyph, TextAndGlyph
NavigationTypes: comma separated list of entities for which this command should be active. Values are Bom, ChangeOrder, File, FileVersion, Folder, Item, Other
@slydlake
slydlake / MenuDefinitions.xml
Last active October 26, 2021 08:53
[VDS Export Files] #VDS #powershell
<?xml version="1.0" encoding="utf-8"?>
<!--
Label: Label string for the command, must be quoted
Description: Description text for the menucommand. Must be quoted
Hint: Hint string, must be quoted
PSFile: Name of the *ps1 file that contains the powershell script to execute when the menu command is invoked, value must be quoted.
Image: Name of a bitmap file that contains the image for the menu command. Image should be 16x16 or 32x32, value must be quoted.
ToolbarPaintStyle: Controls how the item is drawn on toolbars, values are Text, Glyph, TextAndGlyph
NavigationTypes: comma separated list of entities for which this command should be active. Values are Bom, ChangeOrder, File, FileVersion, Folder, Item, Other