Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 72391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:02:14+00:00 2026-05-10T20:02:14+00:00

I am using DSL Tools for Visual Studio 2005. I have a DSL where

  • 0

I am using DSL Tools for Visual Studio 2005.

I have a DSL where at a certain point I would like to create a new Diagram using custom code.

So far, I was able to create a new Diagram by overwriting the current, already opened diagram. Code follows:

FEGeneratorDiagram diag = new FEGeneratorDiagram(ThisElem.Store); diag.Associate(ThisElem); FEGeneratorDiagram currentDiag = (FEGeneratorDiagram)ThisElem.Store.ElementDirectory.FindElements<FEGeneratorDiagram>(false)[0]; currentDiag = diag; 

But, what I would really like to do would be,

to create a new DSL document with a new instance FEGeneratorDiagram and then keep on my logic of adding elements and setting properties.

Any help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:02:15+00:00Added an answer on May 10, 2026 at 8:02 pm
    //Create a Store Type[] modelTypes = new Type[] { typeof(CoreDesignSurfaceDomainModel), typeof(FEGeneratorDomainModel) }; Store store = new Store(modelTypes); RootElement root; using (Transaction t = store.TransactionManager.BeginTransaction('Create Elements')) {     root = FEGeneratorSerializationHelper.Instance.LoadModel(store, diagramPath, null, null);     t.Commit(); } //Do whatever custom things you want!  SerializationResult result = new SerializationResult(); //Save the file FEGeneratorSerializationHelper.Instance.SaveModel(result, root, diagramPath); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a project using DSL tools in Visual Studio 2008. Is
I am using C# and DSL Tools for VS2005. I need to create Transactions
I have the Domain-Specific development with VS DSL Tools book by Cook, Jones, et.all
I have recently begun using Scala. I've written a DSL in it which can
I have a Sinatra based REST service app and I would like to call
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
In my custom DSL tool I want a node in its Explorer which cannot
Using Core Data. Let's say we have models for Team and Player. Assume: -Each
Using PyObjC , you can use Python to write Cocoa applications for OS X.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.