Catia Macro to Change Dimensions Automatically
i want to create a macro to change dimension from any unity to any unit (Like mm to m or mm to cm)
i can select dimension and change visProperties and one dimension but how do i change the unit of several dimensions
here is the macro
Option Explicit
Sub CATMain()
Dim draDoc As DrawingDocument
Set draDoc = CATIA.ActiveDocument
Dim draSheets As DrawingSheets
Set draSheets = draDoc.Sheets
Dim drawDheet As DrawingSheet
Set drawDheet = draSheets.Item("Sheet.1")
Dim views As DrawingViews
Set views = drawDheet.views
Dim draDimensions As DrawingDimensions
Set draDimensions = views.Item("Front view")
Dim oSel As Selection
Set oSel = CATIA.ActiveDocument.Selection
CATIA.ActiveDocument.Selection.Clear
oSel.Search ("Drafting.Dimension,all")
MsgBox oSel.Count
End Sub
i want to create a macro to change dimension from any unity to any unit (Like mm to m or mm to cm)
i can select dimension and change visProperties and one dimension but how do i change the unit of several dimensions
here is the macro
Option Explicit
Sub CATMain()
Dim draDoc As DrawingDocument
Set draDoc = CATIA.ActiveDocument
Dim draSheets As DrawingSheets
Set draSheets = draDoc.Sheets
Dim drawDheet As DrawingSheet
Set drawDheet = draSheets.Item("Sheet.1")
Dim views As DrawingViews
Set views = drawDheet.views
Dim draDimensions As DrawingDimensions
Set draDimensions = views.Item("Front view")
Dim oSel As Selection
Set oSel = CATIA.ActiveDocument.Selection
CATIA.ActiveDocument.Selection.Clear
oSel.Search ("Drafting.Dimension,all")
MsgBox oSel.Count
End Sub