uinas.blogg.se

Catia v5 macros
Catia v5 macros











catia v5 macros
  1. #CATIA V5 MACROS HOW TO#
  2. #CATIA V5 MACROS CODE#
catia v5 macros

'Scan through the Product Structure of the assembly noteing the quantity of 'get the sheet dimensions so that we can place the bom in the right Set QtyDict = CreateObject("Scripting.Dictionary" MsgBox "The linked model is not a product!", vbExclamation 'Check that the linked document is a product and not a part Set oDrawingTables = oBackgroundView.Tables Set oBackgroundView = oDrawingViews.Item("Background View" Set oDrawingSheet = oDrawingSheets.ActiveSheet MsgBox "This utility must be executed from a within a CATDrawing." If Right(oDocument.FullName, 10) "CATDrawing" Then

catia v5 macros

'If not, inform the user and terminate execution. 'Check that the ActiveDocument is a CATDrawing.

#CATIA V5 MACROS CODE#

Original macro code copied from coe.org (it has a couple of missing characters): Option Explicit

#CATIA V5 MACROS HOW TO#

Product just like the code in my title block does.Īnyone knows how to get this macro to do what I want it to do? I've backtracked Productlist(n) and it's declared like this: Dim ProductList(50) As ProductĪs far as I can see it should return the same kind of thing that ends in. I've tried multiple variations like ProductList(n).CE_NUMBER ("CE_NUMBER")īefore in my title block and it does work there. I'm new to programming in general but I've used. When I execute the macro again I get the errors: Therefore I change the code to: Call oDrawingTable.SetCellString(n, 1, ProductList(n).UserRefProperties.Item("CE_NUMBER")) I tested the macro and this works, however I want to write the value of some User defined Properties instead of the preset CATIA properties. I'm having some difficulties implementing it as I require.Īt some point the macro uses the code: Call oDrawingTable.SetCellString(n, 1, ProductList(n).PartNumber)Ĭall Dressup_Table(oDrawingTable, n, 1, 2, 0) I want to create a custom BOM and I found a macro on the coe.org forum (see at bottom of post).













Catia v5 macros