Hi,
Is there a way to link some of the iProperty text to another iProperty text. Eg. end of Partnumber, to end of Description?
If I Copy a part, the Partnumber changes, but I also want the description to change to the same.
Thanks in advance
Solved! Go to Solution.
Solved by JelteDeJong. Go to Solution.
You could try something like this: If you run this rule it will find the part after the _ and add/exchange it with the part after the _ in the description.
Dim partnumber As String = iProperties.Value("Project", "Part Number")
Dim parts = partnumber.Split("_")
Dim lastPart = parts(parts.Count() -1)
Dim oldDescription As String = iProperties.Value("Project", "Description")
Dim descriptionParts = oldDescription.Split("_")
Dim descriptionFirstPart = descriptionParts(0)
Dim newDescription = String.Format("{0}_{1}",descriptionFirstPart,lastPart)
iProperties.Value("Project", "Description") = newDescription
You could run this rule on save or something like that.
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
I only have one small issue.
I have trickered it to run after save.
When I save an assembly it puts "_" after all files.
Is it possible to change the code, so if there's no "_" after the file, it should be left as it is?
Again thank you 😊
Can't find what you're looking for? Ask the community or share your knowledge.