Submitted by GervaldNik on Mon, 04/11/2016 - 11:54
Forums:
Hello! I need some help..
Depending on the workpart name mask is need perform a version code A or B.
name mask for code A: xx.xxxx.x.xxxx.xxx or xx.xxxx.x.xxxx.xxx_pxx
name mask for code B: xx.xxxx.x.xxxx.xxx_kxx
if mask A then
Code A
...
...
if mask B then
Code B....
........
......
How to write this in journal? Please!
re: workpart name
As a first attempt, I'd try something like:
if partName.Contains("_k") then
'use code B
else
'use code A
end if
Workpart name
It's easy and working, thanks.
But how to refer on the workpart name?
partname as string = workpart.name
Or..
if workpart.name.contains("_k")
not working
re: work part name
If you are working with native NX (no PDM/PLM), you can get the part name by using the .Leaf property.
{part reference}.Leaf
If you need to include the path information, you can use the .FullPath property.
{part reference}.FullPath
Done!
Both properties are working!
Thank you so much!!!