I’m trying to set a default drawing number in the revision based on some logic with the PartNum string. I’m having trouble getting started because I don’t know how to get the current part in context from inside “Execute Custom Code”. I’d appreciate if someone can supply me with a code snippet to just get the PartNum in context.
In this case, I use my customized dashboard to assign a textbox value to Char01. Then from the BPM I can access the value as above.
Is this what you were looking for?
Good luck!
Nate
This is for GetNewPartRev. When a new part revision is created, I’d like to autofill the drawing number based on some logic with the current part number in context.
ok, so there are multiple ways to figure out the parameter name…
in the C# Editor, you can type the word “this.” and then press the Ctrl Space key. It will display a list of possible variables. Here you will see that there is a variable called partNum and this is what you are looking for. You actually dont need the “this.” portion in your code, (its ok to leave here though).
Another way is to simply use the Set widget for setting parameters, and then look at which parameters are available. In this list, you can see them: