You will need to create your own script to do what you want to do...
Is there any way, for example in the part, to use some chain processing in a property :
No. There is no way to parse, modify, etc. custom property linked text in a drawing. It is possible to do in a part or assembly model, but not a drawing. You could create a macro that would update the note whenever it is run, but you can't have it automatically update.
If you could figure out a way to generate your bar code based solely on information in the part model (like not including the first letter of the sheet name) then it would be possible.
Not sure if I understand correctly (English is not my first language) -(or maybe I understand what I would like to)
Do you mean that I could, in a part, manipulate property chains and for example make a property from another. I have been trying that without succes so far, either with equations, or by trying to put a "syntaxly correct" VB value for the prop.
Would there be a way to have, in a part, for example:
property= left($PRP:"SW-Configuration Name", 1)
Yes. You have to use VBA and SW API functions inside equations to do it.
The following equation will set the configuration-specific property "concat" to the first letter of the configuration name.
The property must exist already. You can change the name of the property to whatever you want - just keep the name split in two pieces.
"dummy"= part.configurationmanager.activeconfiguration.custompropertymanager.set("con" & "cat", left(part.configurationmanager.activeconfiguration.name,1))
The equation above will only set the property if it exists already. If you are not certain that the property exists or not, you can use this equation:
"dummy"= iif(true,part.configurationmanager.activeconfiguration.custompropertymanager.delete("con" & "cat"),part.configurationmanager.activeconfiguration.custompropertymanager.add2("con" & "cat",30, left(part.configurationmanager.activeconfiguration.name,1)))
Hit the wrong button, sorry.
This is the right answer and it works beautifully.
I used your advice and came out with a working solution (SW2009). The only problem was that the equation would be added only to the current configuration. The solution was to edit the equation in SW -changing nothing, just edit and close- and then the equation was added to all configs.
Then we switched to SW2012:
When we apply the equation, it works fine, still to one config. If we edit the equation, we get a syntax error, that I can't find. It works fine if we go through all configs and call the macro for every one. But in some cases we have 40 configs...
The macro that writes equation:
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Equations", "EQNFOLDER", 0, 0, 0, False, 0, Nothing, 0)
Part.AddRelation """dummy""= iif(true,part.configurationmanager.activeconfiguration.custompropertymanager.delete(""let"" & ""tre""),part.configurationmanager.activeconfiguration.custompropertymanager.add2(""let"" & ""tre"",30, left(part.configurationmanager.activeconfiguration.name,1)))"
The equation written in SW:
"dummy" = iif ( "true" , "part.configurationmanager.activeconfiguration.custompropertymanager.delete" ( "let" "&" "tre" ) , "part.configurationmanager.activeconfiguration.custompropertymanager.add2" ( "let" "&" "tre" , 30 , left ( "part.configurationmanager.activeconfiguration.name" , 1 ) ) )
(adds the "lettre" config specific property valued with 1st caracter of the config. name)