Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Search results for query: *

  1. Lionel35

    CATIA v5r22 sp6: PartDocument problem with my first Catia macro in C#

    @itsmyjob: Yep, many thanks I understand better now, my new code are: string[] activeDocType = myCatia.ActiveDocument.FullName.Split('.'); string choice = activeDocType[activeDocType.Length - 1]; switch (choice) {...
  2. Lionel35

    CATIA v5r22 sp6: PartDocument problem with my first Catia macro in C#

    @itsmyjob It's a "basic" Documents.Add("Part") just to test if my code interacting well with Catia, I don't try more for that, sorry... But I have always the same problem of "cast" error, when I try to use this code: ... static PartDocument myPartDocument = null; static Part...
  3. Lionel35

    CATIA v5r22 sp6: PartDocument problem with my first Catia macro in C#

    @itsmyjob Really? It's strange because it works on my PC (Windows 7) with a CATProduct (with or without Design Mode no problem), and now I tried on 2 other PCs (Windows 7 and 8.1) with other CATProducts and it works too... I don't know why you receive an error... [ponder]
  4. Lionel35

    CATIA v5r22 sp6: PartDocument problem with my first Catia macro in C#

    @JeniaL: I succeed in doing translate in C# of your vb.net code! This is the good code: ... static ProductDocument productDocBase; static Product productBase; ... try { productDocBase = (ProductDocument)myCatia.ActiveDocument; productBase = productDocBase.Product...
  5. Lionel35

    CATIA v5r22 sp6: PartDocument problem with my first Catia macro in C#

    For information, I just successfully performed to add a new part with that code, but I always search a solution for my problem... namespace MacroCatiaTest1 { public partial class Form1 : Form { bool CatiaRunning = false; static INFITF.Application myCatia; static...
  6. Lionel35

    CATIA v5r22 sp6: PartDocument problem with my first Catia macro in C#

    Thanks for your answer, I just tried it and I have two problems: - Visual Studio force me to cast myCatia.ActiveDocument in INFITF.Documents but this casting operation launch an exception (HRESULT E_FAIL with a COM composant)! [mad] - I don't have access to .Product !! But I use "using INFITF"...
  7. Lionel35

    CATIA v5r22 sp6: PartDocument problem with my first Catia macro in C#

    Hello everybody, I'm a newbie here... I'm a software developper in C#, I'm not a master of c# but I know enough to code Windows desktop software in WindowsForm (and sometimes in WPF). I use CATIA v5r22 sp6 (HD2+FS1+KT1 modules) on Windows 7 pro x64 and Microsoft Visual Studio Community 2015...

Part and Inventory Search

Back
Top