| View previous topic :: View next topic |
| Author |
Message |
Edward Troxel Site Admin
Joined: 14 Jul 2004 Posts: 5103
|
Posted: Wed May 10, 2006 5:01 pm Post subject: Vol #4, Issue #3 (May 2006) |
|
|
Revealing a Map Path
Beginner’s Corner - News Ticker
Scripting in C#
Download Vol. 4, Issue 3
Last edited by Edward Troxel on Sun Mar 15, 2009 2:13 pm; edited 1 time in total |
|
| Back to top |
|
 |
dibbkd
Joined: 20 Feb 2006 Posts: 464 Location: Fayetteville, NC
|
Posted: Fri May 12, 2006 9:24 pm Post subject: Re: Vol #4, Issue #3 (May 2006) |
|
|
Those are really cool tips, will have to try them out! |
|
| Back to top |
|
 |
ChapmanPhotography
Joined: 30 May 2006 Posts: 190 Location: Pacific North West
|
Posted: Fri Jun 02, 2006 5:32 am Post subject: |
|
|
| Great newsletter Ed, Your knowlage is impressive! |
|
| Back to top |
|
 |
Freddie
Joined: 10 Mar 2006 Posts: 95
|
Posted: Sun Mar 18, 2007 12:02 pm Post subject: |
|
|
Ed,
I followed the C# tutorial and now have the dll. (I used sharpdev to do this). How do I setup Vegas 6 to see the dll and how do I call it from Vegas 6?
Also, I do have VB.NET 2003. Could I use that for scripting instead of C#? IF so, do you know any links to some sample scripts in VB.NET 2003?
Thanks. |
|
| Back to top |
|
 |
Edward Troxel Site Admin
Joined: 14 Jul 2004 Posts: 5103
|
Posted: Sun Mar 18, 2007 12:07 pm Post subject: |
|
|
You simply put the DLL file in the "Script Menu" folder and Vegas will automatically list it. Just go to Tools - Scripting - Run Script and then pick that DLL file or Tools - Scripting and pick that dll name from the list.
Technically, VB can be used. However, you'll find the vast majority of examples are in JScript or C#. I really recommend C# instead of VB. |
|
| Back to top |
|
 |
Freddie
Joined: 10 Mar 2006 Posts: 95
|
Posted: Sun Mar 18, 2007 1:37 pm Post subject: |
|
|
Thanks Ed, that worked great!
Regarding using C#, I see that you and others moved away from SharpDev and moved to MS VisualStudio C# 2003. From what I can tell, you guys mostly did this due to "bugs" and lack of features in SharpDev at that time.
I was wondering if you or anyone else has the same opionon of the latest release of SharpDev? Maybe it's better now? Perhaps good enough for the casual scipt writter?
Thanks. |
|
| Back to top |
|
 |
Edward Troxel Site Admin
Joined: 14 Jul 2004 Posts: 5103
|
Posted: Sun Mar 18, 2007 7:38 pm Post subject: |
|
|
| I don't know about the current version of Sharpdev. I do know that there's a "lite" version of C# from Microsoft that can be downloaded for free and works for this. |
|
| Back to top |
|
 |
Freddie
Joined: 10 Mar 2006 Posts: 95
|
Posted: Sun Mar 18, 2007 9:22 pm Post subject: |
|
|
Thanks Ed, One more question about this...
I'm using Vegas 6. My understanding is that Vegas 6 uses the .NET 1.1 Framework. Is there are free "lite" version from Microsoft base on the .NET 1.1 framework?
The only free version of C# from Microsoft that I'm aware of the "Visual Studio C# 2005 Express", which is based on .NET 2.0. From other posts, I gather that this won't work with Vegas 6. |
|
| Back to top |
|
 |
Edward Troxel Site Admin
Joined: 14 Jul 2004 Posts: 5103
|
Posted: Mon Mar 19, 2007 12:58 pm Post subject: |
|
|
| That's the one I was thinking of. I don't know of a "lite" one that works on 1.1. |
|
| Back to top |
|
 |
paracelsus
Joined: 20 May 2005 Posts: 8 Location: Stockholm, Sweden
|
Posted: Fri Aug 31, 2007 11:50 am Post subject: |
|
|
| Freddie wrote: | | My understanding is that Vegas 6 uses the .NET 1.1 Framework. Is there are free "lite" version from Microsoft base on the .NET 1.1 framework? |
You can have both the 1.1 and 2.0 framwork installed at the same time on your computer. No need to stick to 1.1, any program will use the version it needs, no worries.  _________________ "Aurum nostrum es non vulgi" |
|
| Back to top |
|
 |
Edward Troxel Site Admin
Joined: 14 Jul 2004 Posts: 5103
|
Posted: Fri Aug 31, 2007 12:52 pm Post subject: |
|
|
| .NET 1.1 and .NET 2.0 are totally separate from each other and, yes, both can be installed at the same time. Also, .NET 3.0 can be installed at the same time as well but does require .NET 2.0 to remain installed. Different versions of Vegas have needed different versions of .NET. |
|
| Back to top |
|
 |
Freddie
Joined: 10 Mar 2006 Posts: 95
|
Posted: Sat May 10, 2008 11:45 pm Post subject: sedll Example, Need Help |
|
|
Ed,
I'm following your example code in "sedll.zip" file. Here is the basic shell of my code, which is essential a copy of yours but with my project/form name. I get an error on the line highlighted below. "error CS1501: No overload for method 'FormMoveToLast' takes '1' arguments".
Any idea what is causing this? I'm using Visaul C# 2005. BTW, Your example code in sedll.zip compiles and runs fine in Visual C# 2005.
| Code: |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Sony.Vegas;
namespace VegasMoveToLast
{
public partial class FormMoveToLast : Form
{
public FormMoveToLast()
{
InitializeComponent();
}
private void FormMoveToLast_Load(object sender, EventArgs e)
{
}
}
}
public class EntryPoint
{
private static VegasMoveToLast.FormMoveToLast form;
public void FromVegas(Vegas vegas)
{
form = new VegasMoveToLast.FormMoveToLast(vegas); <--ERROR HERE: 'error CS1501: No overload for method 'FormMoveToLast' takes '1' argument'
form.ShowDialog();
}
}
|
|
|
| Back to top |
|
 |
Edward Troxel Site Admin
Joined: 14 Jul 2004 Posts: 5103
|
Posted: Sun May 11, 2008 1:47 am Post subject: |
|
|
When you create your form, you have to add the "vegas" parameter. You probably did not do that. You would have something like:
| Code: | public class FormMoveToLast : System.Windows.Forms.Form
{
private Vegas myvegas;
/// <summary>
/// Required designer variable.
/// </summary>
public FormMoveToLast(Vegas vegas)
{
myvegas = vegas; |
|
|
| Back to top |
|
 |
Richard Jones
Joined: 05 Dec 2006 Posts: 84 Location: London
|
Posted: Sun May 11, 2008 10:14 am Post subject: Vol #4, Issue #3 (May 2006) |
|
|
Ed,
Another excellent Newsletter. I am very grateful for all the help you offer in so many ways. Thank you.
Richard Jones |
|
| Back to top |
|
 |
|