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