It will be the same as the sample text Ive shown you. To tell the truth, Im
tired of modellingstructuresjust to import it in PDS (another application)
and be used for interference checking...It will just be a code to create
specific individual objects.
No one will write the text file. An external application will be the one
doing that for me. Ive already tried it and its 0% error as of now. That
external application will write the text file in drive c. For differentstructures, the contents of that text file will also be different. I want to
to create an compiled exe file that could read that text file and create
whats inside the text file inTeklaStructures.
Ah, that changes things. Since the code is being written by an
external application, CSharpCodeProvider seems the way to go.
http://msdn2.microsoft.com/en-us/lib...eprovider.aspx
As far as I understand it (remembering that I've never had to use it
before), you make a string containing your code, create a new
CSharpCodeProvider, create and modify a set of Compiler Parameters to
feed into your CSharpCodeProvider, then make a Compiler Results object
and call "CompileAssemblyFromSource".
string str = "MessageBox.Show(\"You should import your
code into this string.\")";
CSharpCodeProvider provider = new CSharpCodeProvider();
System.CodeDom.Compiler.CompilerParameters cp = new
System.CodeDom.Compiler.CompilerParameters();
cp.OutputAssembly = "Assem1";
CompilerResults cr =
provider.CompileAssemblyFromSource(cp, str);
Remember to add System.CodeDom.Compiler; and Microsoft.CSharp; to your
using statments
I can't really help you any further at the moment, because I'm not
sure how to call an assembly and don't have time to work it out. Good
luck, though.
Cheers,
Qu.