CreateGeometryProxy in C#

CreateGeometryProxy in C#

Anonymous
Not applicable
800 Views
2 Replies
Message 1 of 3

CreateGeometryProxy in C#

Anonymous
Not applicable


Hello,

Im porting my code from VBA to C#.net and get the following problem:



ComponentOccurrenceProxy nominalPointOccProxy;



nominalGeometryOcc.CreateGeometryProxy(nominalPointOcc, nominalPointOccProxy);



The code works in VBA but in C# it will not compile CreateGeometryProxy has some invalid arguments.

Why is this?

0 Likes
801 Views
2 Replies
Replies (2)
Message 2 of 3

jeff.pek
Community Manager
Community Manager
Hi -

I don't have an example in front of me, but I'll bet you need to use the "out" keyword for the 2nd argument:

nominalGeometryOcc.CreateGeometryProxy(nominalPointOcc, out nominalPointOccProxy);

Jeff
0 Likes
Message 3 of 3

Anonymous
Not applicable




public ComponentOccurrenceProxy NominalPointOccProxy





get

{

Object nominalPointOccProxy;

ComponentOccurrence parentOcc = nominalPointOcc.ParentOccurrence;

parentOcc.CreateGeometryProxy(nominalPointOcc, out nominalPointOccProxy);

return nominalPointOccProxy as ComponentOccurrenceProxy;

}

}







Yes out is needed.

Thank you.

Edited by: JohanLarsson on May 4, 2009 10:59 AM