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.


Register Today
COE 2009 Annual PLM Conference & TechniFair

COE DISCUSSION FORUM
Subject: Silent CopyFile operation using API

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

08 Feb 2008 04:16 PM

I am trying to perform a copy File operation on a Document object in SMARTEAM. I am using the following piece of code to perform the operation

objectTreeTask =

Nothing

defaultTask=

Nothing

SessionUtility = STSession.Services("SmUtil.SmSessionUtil")False).ItemByName("CopyFile")If (SessionUtility.OperationAllowedOnObject(DocObject, Operation1, False) = True) Then

SessionUtility.ExecuteOperationOnObjectTree(DocObject, Operation1,

 

The above code runs successfully.

Issue comes when a child of the document object (under copy) has more than one revisions. I get a Life-cycle and File Operations report dialog box (attached). Can anyone tell me how to suppress this message box using the above API?

Thanks in Advance,

Amod

True, X1, X2)End If

Operation1 = STSession.MetaInfo.OperationsForClass(DocObject.ClassId,

 






JOBY


15 Feb 2008 10:41 AM
I don't know if it will work in this case, but you can usually make a task execute with a "behavior"
I've used behaviors before to suppress messages.
Good luck!
~Joe

View Joe Burch's profile on LinkedIn
HALE


27 Apr 2008 04:00 PM
Dear SBURANDE ,

I don't know if you solved your problems but here are two thoughts

1. The line
CATIA.DisplayFileAlerts = False
suppresses some things.

2. Running CATIA with -BATCH on the command line suppresses almost all user interaction.

Regards,
Hale

Badencorp - CATIA/SmarTeam - Installation, Training and Support!
An hour of hard work can often save you 60 seconds on Google.
mpfluger

16 Oct 2008 10:30 AM

I am having a similar problem with some code that I am writing.  I wrote a Batch Utility in Excel VBA that retrieves a CATIA Drawing from the SmarTeam ObjectStore and opens it in CATIA using this code:

            ' Open the drawing in CATIA V5
            Dim catDrawingDoc As INFITF.Document
            Set catDrawingDoc = gsmtCATIAInteg.OpenInReadOnly("CATIA Drawing", smtDBObject.ObjectID)

My problem is that I sometimes get a Warning Dialog box that interrupts the batch utility (please see the attached screenshot).  I want to prevent this dialog box from appearing.  I looked into using the ISmBehavior object, but I can't find a method to copy the file from the vault that uses the Behavior object.  I tried CATIA.DisplayFileAlerts = False, and that didn't work.

Is there another way to open the document in CATIA without displaying this dialog box?  I would appreciate any help.

Thanks,

Matthew Pfluger






You are not authorized to post a reply.
Forums > COE Forums > SmarTeam > Silent CopyFile operation using API



ActiveForums 3.6

    

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