Vault Customization

Reply
Mentor
amitk_189
Posts: 234
Registered: ‎12-15-2011
Message 1 of 6 (202 Views)

Create a preview of File

202 Views, 5 Replies
12-02-2012 11:27 PM

Hello,

I am making a custom preview for a addin that is being developed. My question is, Is it possible to create a new Preview in File Menu. I am using C# as development language.

Employee
Redmond.D
Posts: 796
Registered: ‎12-12-2006
Message 2 of 6 (170 Views)

Re: Create a preview of File

12-04-2012 11:14 AM in reply to: amitk_189

You can create custom commands in the File menu.  You can also create custom tabs, if you want your own Preview tab.

See the HelloWorld example in the SDK.



Doug Redmond
Software Engineer
Autodesk, Inc.
http://justonesandzeros.typepad.com/

Mentor
amitk_189
Posts: 234
Registered: ‎12-15-2011
Message 3 of 6 (141 Views)

Re: Create a preview of File

12-05-2012 02:29 AM in reply to: Redmond.D

Thanks for Reply Doug, I have already created the custom tabs and command in File Menu as this is my second project in vault, but how do you connect to dwf and display it. I created new Form and on form load this has to be done. And add some data on dwf. Can you suggest some ideas on how to do this.

 

 

Regards

Amit

Employee
Redmond.D
Posts: 796
Registered: ‎12-12-2006
Message 4 of 6 (128 Views)

Re: Create a preview of File

12-05-2012 05:42 AM in reply to: amitk_189

Your problem is that somebody selects a CAD file and you want to find the DWF file for the selected file, right?

 

You find this out by getting the child attachments for the selected file (GetFileAssociationsByIds).  The DWF file is the File object with the FileClass value of DesignVisualization.



Doug Redmond
Software Engineer
Autodesk, Inc.
http://justonesandzeros.typepad.com/

Mentor
amitk_189
Posts: 234
Registered: ‎12-15-2011
Message 5 of 6 (125 Views)

Re: Create a preview of File

12-05-2012 07:31 AM in reply to: amitk_189

Ok, i will work out on it, but is it possible to write text on it.

 

Rgds

Amit

Mentor
amitk_189
Posts: 234
Registered: ‎12-15-2011
Message 6 of 6 (110 Views)

Re: Create a preview of File

12-06-2012 01:26 AM in reply to: amitk_189

Hi Doug, I am getting SOAP Exception on associationArrays=Doc_....., where am i going wrong, how can i rectify this

I

ISelection selection = e.Context.CurrentSelectionSet.First();

SelectionIndex = e.Context.CurrentSelectionSet.First().Id;

 

SecurityService SecService = new SecurityService();
SecService.SecurityHeader = new Autodesk.Connectivity.WebServices.SecuritySvc.SecurityHeader();
SecService.Url = "http://" + LocalServerName + "//AutodeskDM//Services//v17//SecurityService.asmx";
SecService.SignInReadOnly("Administrator", "root123", "vault");

DocumentService Doc_Service = new DocumentService();
Doc_Service.SecurityHeaderValue = new Autodesk.Connectivity.WebServices.DocumentSvc.SecurityHeader();
Doc_Service.SecurityHeaderValue.UserId = SecService.SecurityHeaderValue.UserId;
Doc_Service.SecurityHeaderValue.Ticket = SecService.SecurityHeaderValue.Ticket;
Doc_Service.Url = "http://" + LocalServerName + "//AutodeskDM//Services//v17//DocumentService.asmx";

 

FileAssocArray[] associationArrays;
try
{
associationArrays = Doc_Service.GetFileAssociationsByIds(new long[] { SelectionIndex }, FileAssociationTypeEnum.Dependency, false, FileAssociationTypeEnum.Dependency, false, false, false);
}
catch(Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.ToString());
}

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community