Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK 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. MarcL68

    How to activate the sheet to which the selected view belongs?

    Hi, I think that the sheet is allready activated if you have selected a view. Here the code to retrieve the sheet name: Sub CATMain() Dim Document1 As Document Set Document1 = CATIA.ActiveDocument Dim selection1 As Selection Set selection1 = Document1.Selection Set myview =...
  2. MarcL68

    Deactivated body in assembly

    Hi , You can go through all parameters and looking for Boolean with name including "Activity" and value "false". Example : Body.3\Pad.3\Activity = false Regards Marc
  3. MarcL68

    CATIA Customize View Parameters MACRO

    Hi, Have a look to Rendering mode property: Regards Marc
  4. MarcL68

    Macro for switch ImageViewMode between Exact View and Raster

    Hi, Sorry but it seems that the options are not reachable by macro. Do you read this post : https://www.eng-tips.com/viewthread.cfm?qid=506224 Regards Marc
  5. MarcL68

    Broken View Alignment

    Hi, You have to check this option before generate the views Regards Marc
  6. MarcL68

    Macro for switch ImageViewMode between Exact View and Raster

    Hi , do you try with : (From CAA V5 Visual Basic help) CatRepresentationMode (Enumeration) enum CatRepresentationMode { catExactMode, catPolyhedricMode, catVisualMode } Representation mode of a generative view. Values: catExactMode View is generated from topological data...
  7. MarcL68

    Problem when importing STEP file into CATIA - Assembly combined into one PART & PARTBODY

    Hi, I found this script to convert a CATpart with bodies to a CATProduct, but I didn't test it. '------------------------------------------------------------ ' Makroname = KopyPARTtoPRODUCT.CATScript ' ' ' Author: Filippo Gozza ' Version: V5R10, V5R12...
  8. MarcL68

    Selection.Search macro

    Hi , I think that the Search method is searching in the document and not inside your array. Regards Marc
  9. MarcL68

    Part Renaming According to New Parameter

    Hi , they are some mistakes in your code: -a Next is missing in the loop (For ... Next) -to retrieve the partnumber you have to use the CatDoc.Product instead of CatDoc.Part -remove the i in the instr fonction. This argument is optional and sets the starting position for each search. If omitted...
  10. MarcL68

    Catia Macro: Open up Exisiting Excel from Catia

    Hello, To open an existing file : Dim Template as string Template="C:\Temp\myExcelTemplate.xlsx" Set myWorkbook = Excel.Workbooks.Open(Template) Remove the line "Excel.Workbooks.add" from your code. Regards Marc
  11. MarcL68

    Issue opening a file.............

    Hello, You can use "DWG TrueView 2018", it's a free Autodesck viewer that will allowed you to open and convert DWG files in older version, (DWG 2000 is readable by CATIA) Regards Marc
  12. MarcL68

    Drawing Balloons

    Hi Lucas, I also have errors by using the remove methode but sometimes the leaders are removed, that why I add "On Error resume Next" to trap this errors. Try this code: Sub CATMain() Dim DrawingDocument1 As Document Set DrawingDocument1 = CATIA.ActiveDocument Dim Selection1 As Selection...
  13. MarcL68

    Macro acting like replace text function ( in catdrawings )

    Hi, Maybe this post can help you : Link Regards Marc
  14. MarcL68

    Projection view links catia

    Hi, here a small code that links the positions of each view : 1.front view must be active 2.align manually the views if they are disaligned Sub CATMain() '*********************************************************** '*** Macro de réalignement des vues *** '*** V00...
  15. MarcL68

    Exporting Catia drafting dimensions to excel

    Hi, Can you share your code, so I will check it. Regards Marc
  16. MarcL68

    Exporting Catia drafting dimensions to excel

    Hi, Instead of Set xl = GetObject(, "Excel.Application") If Err <> o Then Set xl = CreateObject("Excel.Application") xl.Visible = True End If Set Workbooks = xl.Application.Workbooks Set myworkbook = xl.Workbooks.Add Set myworksheet = xl.ActiveWorkbook.Add Set myworksheet =...
  17. MarcL68

    Exporting Catia drafting dimensions to excel

    Hello Ashish, You should write the conversion only for angle, here in the code: Select Case MyDimType Case 5, 6, 7, 8, 17, 19 'radius type rayon MyDimTypeTexte = "R" Case 9, 10, 11, 12, 13, 18 MyDimTypeTexte = "Dia" 'diameter type...
  18. MarcL68

    Exporting Catia drafting dimensions to excel

    Hi @LWolf: This is a good tip I will try it. @ashish2112: The angle unit for CATIA is radian that why the macro export radian. You have to convert in degree: PI = 4 * Atn(1) myworksheet.Cells(i + 1, 2).Value = (MyDimensionValue * 180 / PI) Regards Marc
  19. MarcL68

    Titleblock grid macro modification

    Hi, Reverse these 2 lines : t=Chr(64 + Nb_CM_V + i) t=Chr(65 + Nb_CM_V - i) Modified code: For i = 1 To Nb_CM_V 't=CStr(Nb_CM_V + i) 't=Chr(65 + Nb_CM_V - i) t=Chr(64 + Nb_CM_V + i) CreateTextAF t ,GetWidth() - .5 * GetOffset(),.5 * GetHeight() + (i - .5) *...
  20. MarcL68

    Titleblock grid macro modification

    Hi, try these changes: I have comment the original lines. For i = Nb_CM_H To (Ruler/2/Cst_1 + 1) Step -1 'CreateTextAF Chr(65 + Nb_CM_H - i) ,.5 * GetWidth() + (i - .5) * Cst_1,.5 * GetOffset(),"Frame_Text_Bottom_1_"&Chr(65 + Nb_CM_H - i), catMiddleCenter, 3.5 'CreateTextAF Chr(64 +...

Part and Inventory Search