Create Part in place (c# macro)

Experimenter
Experimenter

Hi there,

I'm hoping someone can help me out with an API issue I'm having:

 

I'd like to automate the' create part in place' command using a C# macro.

 

I see that there is a method:

OnCreateInPlacePartUI(Filename, AppendToTitle, Template)

as seen here

I'm a little unsure of how to use the file ui application events, or if this is in fact the right way to do it

 

I've also seen this post, which descibes more or less what I'm trying to achieve, using VB. I'm useless with VB, Is there someone out there (with better VB translation skills) who can provide a similar code snippet in C# for me?

 

Thanks in advance.