|
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 |
 |
|
 |
| You are not authorized to post a reply.
|
|
| Author |
Messages |
|
SUPERGILOU
 |
| 08 Nov 2007 02:08 PM |
|
Hello Guys!!
I 've a little problem! I am developping an applcation VB6.0 with Smarteam and the SMDEMO DB. Someone could tell me how to do a check out of a CAT product (for example and for persitent objects in general) and load it in CATIA V5 R16.
Thanks !
|
|
|
|
|
HALE

 |
| 11 Nov 2007 10:57 PM |
|
Gilou,
Do a search on stiEngine. There are a couple of recent threads where we talked about writing VB and VBA programs and loading things into CATIA programmatically.
Regards, Hale |
|
Badencorp - CATIA/SmarTeam - Installation, Training and Support! An hour of hard work can often save you 60 seconds on Google. |
|
|
SUPERGILOU
 |
| 14 Nov 2007 09:24 AM |
|
Hi Hale !! I had read all discussions about the check out from ST to CATIA and the stiEngine. I think this method is only available in R17, or am I wrong. I am a beginner in this field I need your indulgence. According to what I've understood, this method, could I get the product selected by the user in the ST Explorer Window: Search Editor and load it in CATIA ( I have both ST and CATIA R16). How couldI do it without stiEngine?
Here is the beginning of the code :
Set Myengine = CreateObject("SmApplic.SmEngine") Myengine.Init "SMTEAM32.INI"
MyUserLogName = CB_Item.Text MyUserLogPassword = PWD_Text.Text Set Mysession = Myengine.CreateSession("Mysession", Myengine.ConfigurationName) Mysession.OpenDatabaseConnection Myengine.Databases(0).Alias, Myengine.Databases(0).Password, True
Mysession.UserLogin MyUserLogName, MyUserLogPassword
If Mysession.UserLoggedOn Then MsgBox "Vous êtes un utilisateur déclaré dans la base", vbOKOnly + vbInformation, "SMARTEAM KNOWLEGDE" Set MyGUIServer = Mysession.GetService("SmGUISrv.SmGUIServices") 'get GUI Store Set MyGUIStore = MyGUIServer.GUIStore 'run objects query Set MyObjCollection = MyGUIStore.SelectObjectOnQuery 'if objects exisits If MyObjCollection.Count > 0 Then 'create new View Set MyView = MyGUIServer.NewView(vwtCustom) ' ouvre l'arborescence du prdt select 'create window view Set MyViewWindow = MyGUIServer.NewViewWindow 'put view on window MyViewWindow.SmView = MyView 'get composite objects from MyObjects Set MyCompositeObjects = Mysession.ObjectStore.CompositeObjectsFromData(MyObjCollection.Data, True) ''on recupère la CLASS_ID et la OBJECT_ID de l'élément selectionné MyClassId = MyCompositeObjects.Data.Value("CLASS_ID", 0) MyObjectId = MyCompositeObjects.Data.Value("OBJECT_ID", 0) 'mettre l'élément sur la fénêtre MyView.DisplayObjects.CompositeObjects = MyCompositeObjects 'Ouverture de la profile card de l'objet MyViewWindow.ShowModal
So, How could I get the product selected and load it in CATIA.
Thanks a lot
Gillou |
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.6
|
|
|
|