Welcome to the COE Discussion Forum! 

 

To participate in the discussion forum, you must be logged in to the website.  If you forget your login information, please contact COE Headquarters at coe@coe.org or (800) 263-2255.

If you are new to the COE Discussion Forum and would like to participate, please register.


Forum Highlight: CATIA V6

 

Get Answers to Your V6 Questions
Dassault Systèmes answers user questions about CATIA V6.  Discuss these answers and propose new questions with end users from around the world in the CATIA V6 Forum.

COE DISCUSSION FORUM
Subject: How to instanciate by using Vb or VB.net Document template

You are not authorized to post a reply.   
Author Messages
nBouikni19

30 Mar 2008 10:21 AM

Hi I’m really confused because I can’t tackle my problem.

Actually, I never had a problem with the UDF instantiation in the partdocument context. So I discover that all what I know about the UDF instantiation don’t work in the context of productdocument.
So I will be very happy if anyone can help me to resolve this problem

How can I instantiate document template (which is composed of a CATIA product (of 2 parts)) by using an “instance factory”.

 

Dim mUdfFileName As String = "C:\DocumentTemplate\ProductTemp.CatProduct"

Dim UDFDocumentemplate As ProductDocument = CType(ICATIA_Appl.Documents.Read(mUdfFileName), ProductDocument)

Dim strUdfName As String = "ProductTemp"

Dim UDFReference As AnyObject = UDFDocumentemplate.Product.Products.Item(strUdfName)

'------- My problem: Instead of using mPart (which is a part of partdocument) I want to use a Methode like GetCustomerFactory in context of productdocument, because my document template is a product. ------------

 Dim UDFFactory As InstanceFactory = CType(mPart.GetCustomerFactory("InstanceFactory", InstanceFactory)

 
'------- It’s important to know that my product template doesn’t contain an Input. The PutInput methode is not required in my context--------

Dim UDFInstance As AnyObject = UDFFactory.AddInstance(UDFReference)

 

So please, is there anyone to help me to know if I’m in the right way, the above script doesn’t work ??

 
PS: I’m working with VB.Net

 
Thanks to help me

MBERCELI

19 Nov 2008 01:48 PM

Hi, did you ever find an answer to this?  I'm struggling with the same issue.  Is it even possible?  I'm using V5R17 and VB.

You are not authorized to post a reply.
Forums > COE Forums > CATIA V5 Programming > How to instanciate by using Vb or VB.net Document template



ActiveForums 3.6

    

401 North Michigan Avenue, Chicago, IL 60611-4267 | (312) 321-5153 | (800) COE-CALL (U.S.)