-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
Hello,
I would like to acquire output variables of method.
I have following plc code sample:
CLASS MyTestClass
VAR PUBLIC
myINT : INT ;
END_VAR
METHOD PUBLIC MyMethod : INT
VAR_INPUT
varin1 : INT;
varin2 : INT;
END_VAR
myINT := varin1;
VAR_OUTPUT
varout1 : INT;
varout2 : INT;
END_VAR
END_METHOD
END_CLASS
For input variables I'm using following code which is working just fine:
var inputVars = methodDeclaration.Variables.Where(v => v.Section == Section.Input);
where methodDeclaration is type of IMethodDeclaration from AX semantic model.
However, for output variables following code doesn't work:
var outputVars = methodDeclaration.Variables.Where(v => v.Section == Section.Output);
I would expect to get a list of variables in VAR_OUTPUT, but I've got an empty list.
Am I missing something or is there a different way to acquire output variables?
Thanks.
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested