Hi,
I have another problem with configuration of Data Standard.
I have one property called "Code" mapped on Autocad Title Block. This property is the File name without extension.
Exemple:
File Name: AAA1234.dwg
Code: AAA1234.
I would make sure that, when creating a file with Standard Data Vault Explorer, the "code" field is filled in automatically by reading the File Name property (_XLTN_FILE NAME) no extension.
I tried usig Help of data standard (create a function etc). But not run.
Do you have any suggestion?
Thanks....
Bruno.
Solved! Go to Solution.
Solved by marco.mirandola. Go to Solution.
Hi Bruno, the file name is generate only at the end, when you press the OK button. The function GetNewFile is called, present in the default.ps1 file. In taht function, you can add some lines of code that will populate your property like this:
function GetNewFileName { $dsDiag.Trace(">> GetNewFileName") ... .. ... $dsDiag.Trace("<< GetNewFileName $newfileName")
$Prop["Title"].Value = [System.IO.Path]::GetFileNameWithoutExtension($newfileName)
return $newfileName }
in my example i have set the Title, but you can set which ever property you like. I guess it will be called Codice or similar.
Basically, i let the new file name to be generated and saved in tht evariable $newfileName, take only the file name and save into my property.
i hope this helps
ciao
marco
Thanks Marco,
very very valuable help.
I think i will many question to ask on this forum.
Thanks again.
Bruno