Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Talou
  • Order by date
  1. Talou

    Marshal.GetActiveObject("CATIA.Application"); COMException: Invalid class string

    Ok, Thank you Tesak. Will try a reinstallation. T.
  2. Talou

    Marshal.GetActiveObject("CATIA.Application"); COMException: Invalid class string

    Hello, I made an automation that work fine on Windows 10. When I put it on Windows 7 or Windows 2012. (they both have framework higher that 4.5.2 installed) I get the following exception when doing Marshal.GetActiveObject("CATIA.Application"); Exception: Unhandled Exception...
  3. Talou

    'Update' search

    Hello Alan, Would GetUpdateStamp() on CATISpecObject what you need? Go through all the parts. Cast them to CATISpecObject and try GetUpdateStamp(). I'm not giving more detail as this is CAA and I don't know if you asking in CAA or Automation? Talou;
  4. Talou

    How to call an automation executable from CAA ?

    One workaround: From CAA --> Call CATScriptUtilities::ExecuteScript(Launcher.catvbs) and from Launcher.catvbs call -> CATIA.SystemService.ExecuteBackgroundProcessus(Automation.exe) Then it come back to CAA and when the CAA command finish, the Automation.exe start. The down side is no error...
  5. Talou

    How to click the "OK" button ?

    Hello, The I need to call "Delete Useless Elements" command in Catia. From CAA, I could call it with CATAfrStartCommand. But how to click the “OK” button on the dialog that appear? Tks, Talou;
  6. Talou

    How to call an automation executable from CAA ?

    Hello, I build a Catia command in CAA. In the CAA code, I reorganize the Geometrical Set. (that work fine) The I need to call Delete Useless Elements. I could call the Catia command “Delete Useless Elements” with CATAfrStartCommand. But I didn’t know how to click the “OK” button on the...
  7. Talou

    How to know if user selected a Part or a Product ?

    And now, here is the answer of the question I had for that thread: The real question was how to know if the user selected the Part itself or the Document under the part. The following function will return an object on the Document, whatever the selection made by the user. Thanks Tesak, the key...
  8. Talou

    How to know if user selected a Part or a Product ?

    LWolf helped me. Here is the solution. Selection pSel = CATIA.ActiveDocument.Selection; Product pProd = pSel.Item2(1).Value as Product; CATBaseDispatch pObj = pProd.ReferenceProduct.Parent; PartDocument pPart = pObj as PartDocument; pSel.Clear(); pSel.Add(pPart.Part); // <-- The missing...
  9. Talou

    How to change Workbech ?

    Thank you LWolf! Why do I suck so much at this! I tried to feed the selection1.Add with PartDocument, ProductDocument, Document... Nothing was working. When I'm reading the doc; I'm still confuse between CATIAPartDocument (which I guess it the .Part) and PartDocument which is something else...
  10. Talou

    How to change Workbech ?

    Hello, New question, new thread... I want to launch the command "Delete Useless Elements" which is in the "Part Design" workbench. In the following pic. We can see that the user selected the Document. However, the active object is a product. Therefore we are on the "Assembly" workbench...
  11. Talou

    How to know if user selected a Part or a Product ?

    Hello Tesak, I need your help again. In the following simple assembly. If the user select the Document, the workbench "Assembly" is still active as the user didn't double click on the document. Therefore it failed when I try to launch the command "Delete Useless Elements" which belong to the...
  12. Talou

    How to know if user selected a Part or a Product ?

    By the way Tesak, I LOVED the post you provide for Product reordering in CATIA V5 VBA. https://www.eng-tips.com/viewthread.cfm?qid=445034 That what made me start writing in VB.net. I think it would be better for me to go with CSharp. I have code example on other framework that I will probably...
  13. Talou

    How to know if user selected a Part or a Product ?

    There is something weird with my object... If I do File, New Product and New Part and use the code on those. Then the code works. But if I use it on the object on which I need to work on. It's doing that error. On these, it's works: On these, it's not working: Some_Part_3 seem standard...
  14. Talou

    How to know if user selected a Part or a Product ?

    Hello tesak, tks again for helping. I'm getting the following error when I run the code: An unhandled exception of type 'System.MissingMemberException' occurred in Microsoft.VisualBasic.dll Additional information: Public member 'ReferenceProduct' on type 'Part' not found. on the line: Dim...
  15. Talou

    How to know if user selected a Part or a Product ?

    Hello, I would like to know if the user selected the Part or the Product. To go around the problem, I cast the object into a Part and if it’s fail I suppose I’m on the Product and I cast to the Product. I would prefer to find what object I’m on before casting it. Thank you, Vincent...
  16. Talou

    Interop.INFITF.dll where is that from?

    Hello Tesak, Nice! That allowed me to connect some dot in my head. I found the objects I need in the object browser and I can see from there which lib/tlb that I need to add my project references. I'm able to build and execute. But I don't get theses dll. Would you know how they get built...
  17. Talou

    Interop.INFITF.dll where is that from?

    Hello, I have to do some automation in VBA or VB.Net as there is not CAA API for the commands I want to use. One of them is "Delete Useless Elements" (in Tools, when you are in the Part Design Workbench) I found a thread where they speaking about Product reordering in CATIA V5 VBA. "itsmyjob"...
Back
Top