there are the Utilities in 3DX Batch Management; "DataExchangePLMBatch": Batch App for data exchanges between DXF, IGES, STEP, Multi-CAD, ICEM formats and the 3DEXPERIENCE platform.
in the documentation:
"Creates datums from a multi-domain result feature, one datum is created by object domain.
Note; Available only for a shape design feature as input ( not for datum feature )."
it seems that sketch USED to be acceptable, now it is not... So I created a JOIN of the sketch...
Sub CATMain()
Dim V As Integer
Dim StrWindows As String
Dim DrawingExists As Boolean
DrawingExists = False
Set windows2 = CATIA.Windows
For V = 1 To windows2.Count
StrWindows = windows2.item(V).name
MsgBox windows2.item(V).Parent.name
If InStr(StrWindows, "Drawing") Then...
this functionality exists in Assembly Design Workbench (Tools-Generate CATPart from Product) or in Infrastructure/Product Data Filtering (Product To Part)
this code assumes you have already selected your AxisSystem. I retrieve all the info from this axis system (origo, axis coordinates) and create two lines that will span the plane.
Sub CATMain()
Dim partDocument1 As partDocument
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As part
Set...
Hi Tiago, select the Axis System, and set
part1.InWorkObject=sel.item(1).value
Set CurrentHBody = part1.InWorkObject
that will set the parent geo-set as "Define in Work Object" -- and from here you can navigate your way up to the top, right?...
You really need to post your code. Are you checking the instance? Because that IS a product. Or are you selecting the .catpart (it has only one cog-wheel as icon), one level below the instance.
If your rivet holes are created with a pattern, you can re-use this same pattern in assembly; CATIA has this functionality in Assembly called "Reuse Pattern"
I usually try to
read a file into CATIA,
work on the data,
and then dump out the data into the file in one go.
and not go back and forth throughout the script execution...