Continue to Site

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. VojtaR

    CGR to CATPart converter

    Hello everyone, would anyone be able to modify this macro so it translates all CGRs in folder to CATParts? Following macro is doing file by file, with manual selection of each file... Sub CATMain() Dim sInputFile As String sInputFile = CATIA.FileSelectionBox("Choose cgr file..."...
  2. VojtaR

    Link between product parameter and drawing parameter macro

    Hello all, I am trying to make a macro for link between parameter created in Product to parameter in Drawing... So far I have this: 'Publish Name Dim oPubName As String oPubName = "NAME" Dim oProduct As ProductStructureTypeLib.Product Set oProduct =...
  3. VojtaR

    Calling CATScript from VBA

    It helped, was not quite there yet.... but with little tweaking, thic code below worked. Thank you!! Private Sub CB_format_BOM_Click() Unload UserFormStart Dim param() Dim oFilePath, oM As String oFP = sMainFolder & "\FORMAT BOM\" oM =...
  4. VojtaR

    Calling CATScript from VBA

    No I run it from Catia
  5. VojtaR

    Calling CATScript from VBA

    Hello everyone, I am having trouble with my macro which should call CATScript. Can anyone help? I am getting error on line "catScriptLibraryTypeDirectory" Private Sub CB_format_BOM_Click() Dim param() Dim oFilePath, oFileName, oM As String oFilePath = sMainFolder & "\FORMAT...
  6. VojtaR

    Macro for axis systems coincidence

    Hello guys, I would like to know, if anyone of you have an idea how to write a macro which will do following. I have Product with many parts and one part is (lets call it master) used for positioning all the parts (containing many axis systems). Each part have only one published axis system...
  7. VojtaR

    Modification of table column size and fonts

    Well, thank you for that... if I would be skilled in making macros, that would help, but I have no knowledge in that. I can only modify some macro by try and error. I have not found anything regarding modification of table on this forum... Could you please help, at least how do I modify one...
  8. VojtaR

    Modification of table column size and fonts

    Hello all, I would like to use a Table from CSV function, but after insertion I would like to modify column sizes of that table. What I would expect: I select the table --> run the macro --> table modified In the macro there would be that column 1 should be XXmm size; column 2 XXmm and so on...
  9. VojtaR

    Write a formula into EXCEL

    Hello, I am looking everywhere for a way how to write a formula into cell, but am keep getting this error: --------------------------- CNEXT - CATScriptErrorMessages - ScriptingERR_1002 --------------------------- Execute the script "Excel formulas.CATScript". The scripting engine for...
  10. VojtaR

    Search in part number

    Hello, I would like to write simple macro which will search "__" (double underscore) in part number. Our Part number looks like this: XXXXXXXXXXXX-XX_XXXX_SOMETHING_SOMETHING_ELSE__WORD1_WORD2_WORD3 I want to get message with "SOMETHING SOMETHING ELSE" and "WORD1 WORD2 WORD3" Can someone help...
  11. VojtaR

    List added properties in drawing

    Thank you for your answer, but it was not working either... I have looked through some other macros found on-line and found this is working: Call oDrawingTable.SetCellString(n, 3, ProductList(n).[highlight #8AE234]ReferenceProduct[/highlight].UserRefProperties.Item("Property1").[highlight...
  12. VojtaR

    List added properties in drawing

    Hello, is there a way to list my properties in drawing when pointed to a product? Simply I want a text field like this: Property 1: "Property 1 text" (link on property 1 as in picture) Property 2: "Property 2 text" ...... etc... I found that I should address it like this: Call...
  13. VojtaR

    Catia Macro for mass

    Hello, I have quite special request... I would like to have "live" mass parameter in the drawing. ("live" in a meaning that parameter in drawing will get updated according to parameter in product and that will get updated according to part's design). I would like to create macro which will...
  14. VojtaR

    Renaming macro

    Thank you again, but it is not working properly... Here is what I have edited: Sub CATMain() Dim PartDocument1 As Document Set PartDocument1 = CATIA.ActiveDocument Dim oSel As Selection Set objSel = PartDocument1.Selection Dim Text As String Dim TextArray Dim vstup As String Dim nazev As...
  15. VojtaR

    Renaming macro

    As I said it worked exactly as I wanted, but... When I tried to rename parameters it did not work... so I have modified the macro (somehow) and now it is supper slow, but still works. Could you please suggest how to do it in a way, that it will not be so slow? Current code: Sub CATMain() Dim...
  16. VojtaR

    Renaming macro

    Thank you very much LWolf!! It works exactly as I wished.
  17. VojtaR

    Renaming macro

    The point is, that I have not created the code and I do not understand it. Colleague who created it, left and no one else understands it, that is why I asked here. If I would be able to try it by myself, I would. With hints you gave me, I might be able to google all that, but I do not know the...
  18. VojtaR

    Renaming macro

    Hello, I have a macro which add a prefix to everything I select (Geometrical sets, bodies, sketches, lines, outputs, surface features, parameters etc...) Would someone be able to modify it, so it have the same function + when I run it again on already renamed features, it will change its...
  19. VojtaR

    Inserting power copy with macro

    Hello, Is it possible to insert a power copy with a macro. E.g. I have power copy with constraints: plane, line, point and 16 parameters which are already present in part where I am inserting PC and they have certain name. Is it possible that user will select only plane line and point and...
  20. VojtaR

    Macro for replacing parameters

    Hello, Could anyone help with writing a macro? I have list of external parameters e.g. 01_length; 02_angle... then I have a second group of parameters: example_01_length; example_02_angle... I would like to select 01_length run macro Macro should do: replace 01_length with example_01_length...

Part and Inventory Search