SDE-VS: Customize Roundtrip

Hi,

is there a way to customize the codegeneration of the roundtrip feature (c#) in SDE-VS 5.0 (VS2008)?
I modified the instant generator templates but with no success… They’re only used by the instant generator…

Among other things, I want to modify the code generation of properties…
Instead of this default code:


private bool _MyProp;

public bool MyProp{
    get {
        return _MyProp;
    }
    set {
        _MyProp = value;
    }
}

I want this:


private bool _MyProp;

public bool MyProp
{
    get
    {
        return _MyProp;
    }
    set
    {
        if(_MyProp == value)
            return;

        _MyProp = value;
        NotifyPropertyChanged("MyProp");
    }
}

Best regards,
Ramon

Hi Ramon,

Thanks for your post. I’ve passed your request to our engineers to study the possibility to support this. If there is any news on this issue, I’ll come back to you.

Best regards,
Lilian Wong

[quote=rkania]Hi,

is there a way to customize the codegeneration of the roundtrip feature (c#) in SDE-VS 5.0 (VS2008)?
I modified the instant generator templates but with no success… They’re only used by the instant generator…

Among other things, I want to modify the code generation of properties…
Instead of this default code:


private bool _MyProp;

public bool MyProp{
    get {
        return _MyProp;
    }
    set {
        _MyProp = value;
    }
}

I want this:


private bool _MyProp;

public bool MyProp
{
    get
    {
        return _MyProp;
    }
    set
    {
        if(_MyProp == value)
            return;

        _MyProp = value;
        NotifyPropertyChanged("MyProp");
    }
}

Best regards,
Ramon[/quote]

This is very important for us also. We are evaluating some uml tools to use in a large project which will have more than 1000 classes and this functionality is a must for us. There should be a configuration to generate specific templated code depending on stereotypes. We achieved this by using instant generator but we need it in round-trip for C# in SDE. The only tool we have discovered which has this functionality is Enterprise Architech but VP’s user interface is much more better. Please inform us on this thread or reply if VP has this functionality.

Gökçer Gökdal
gokcer.gokdal@probase.com.tr

Hi Gökçer Gökdal,

Thanks for your post. We are sorry that currently we do not support, but we will consider and study the feasibility to support it. I’ll keep you informed for any news on this issue.

Best regards,
Lilian Wong

Hi Ramon, Gökçer Gökdal,

Our Project Manager review this request and plan to support this after VP Suite 4.1 (September 2009), I’ll keep you informed for any further news.

Best regards,
Lilian Wong

Hi Ramon, Gökçer Gökdal,

I’m sorry that this feature is delayed to VP Suite 4.2, which will be released on 11th January 2010. In this release, you can customize the code template for round-trip engineering at Modeling > Application Options > Visual Studio > Generate Code (see “customize_code_template.png”). Then you will get the code generated as you defined (see “generated_code_by_round-trip_engineering.png”).

I sent you a private message with link to download release candidate (RC) of VP Suite 4.2. Please feel free to ask if you have any further inquiry.

P.S. Wish you a happy new year! :smiley:

Best regards,
Lilian Wong

generated_code_by_round-trip_engineering.png
customize_code_template.png