I have a VBA code which gets the centerpoint coordinate of an edge. I want that to be done in python.
Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim ref As Reference
Dim SPA As Workbench...
Good day to everyone!!
I am using Catia V5, for one of my project I need to get the link type of all elements in the links of document window as shown in the below snip.
I'm able to get the linktype for elements where pointed document is there using the below code.
But for items which...
I am looking for accessing link type of the pointed document.
Below is the code I am using, I'm able to get the path of pointed document but link type is not working.
Any suggestions on workaround of getting link type will be appreciated.
Set stiEngine = CATIA.GetItem("CAIEngine")
Set stiDbItem...
Hello,
I'm trying to create a new drawing document using CATIA.Documents.Add("Drawing")
Post creation the sheet format and sizes are empty as shown.
I tried the following but it is throwing err in papersize line. Is there any other way?
Dim drawingDocument1 as DrawingDocument
Dim...
Hello Everyone,
I'm trying to import an annotated view from a product to a drawing.
I have did some workaround using CATIA.StartCommand.
Here is my code
Set drawingSheets1 = drawingDocument1.Sheets
Set drawingSheet1 = drawingSheets1.ActiveSheet
Set drawingViews1 = drawingSheet1.Views...
Hi Everyone,
I am trying to select a part using search, but I'm not getting the results
Set ActDoc = CATIA.ActiveDocument
Set oSel = ActDoc.Selection
srchStrng = "AB3C-1234-J"
oSel.Search "CATProductSearch.Product.PartNumber=" & srchStrng & "*,all"
When I do the search manually it gives the...
Hi Everyone,
I'm looking to find a syntax to search a particular fake dimension value instead of looping through
selection1.Search "CATDrwSearch.DrwDimension.DimFakeAttr=TRUE,all"
For i = 1 to selection.count
Set drawingDimension1 = Selection1.Item2(i).Value
Next i
I'm expecting something...
Hello everyone,
I'm trying to coincidence 2 different sub-assy axially. I'm facing issue in converting the user selected input into reference as CreateReferenceFromName.
Please suggest me any methods,
Set oDoc = CATIA.ActiveDocument
Set oProd = oDoc.Product
Set constraints1 =...
Hello Everyone,
I'm trying to fix a Part in an assembly using constraints but I'm getting (method "AddMonoEltCst") Error.
Below is my code,
Set oDOC = CATIA.Documents
Set oTemplateDoc = oDOC.Add("Product")
Set oTemplateDocProd = oTemplateDoc.Product
Set oTemplateDocProds =...
I'm working on a macro which copy/paste a product into a new product document and constrain it.
Whenever I paste the product in an assembly in new product document it changes the sub-assy into flexible sub-assembly.
I tried Catia.StartCommand("Flexible/Rigid Sub-Assembly"). But if the...
Hi All,
I am trying to create an annotation view in my product. But as soon as I have created it I am getting the view as Isolated and it is not showing the reference. Please check the smap attached. It would be much of a help if anyone could answer it.
My code as follows,
Set...
Hello Everyone,
I am trying to create a view based on an annotated view created in a product to a newly created drawing using "View From 3D" option.
I tried record macro but I couldn't get anything. Is there any other way to create the view?
Hello everyone,
I am working in an assembly which contains numerous child products and parts. I am trying to measure the coordinate of a circular edge, all I am getting is based on the part's axis system. I need to get the global coordinate. Is there any idea to get it?
As far as I have the...
Hello All,
I need your help, I am trying to create a TPS Section cut(Annotation Section Cut) in my product at an particular angle to the reference plane. I have created the view but I don't know how to add the angle 1.28 deg as shown.
Language = CATVba
Sub CATMain()
Set ActDoc =...
Hello All,
I need your help, I am trying to create a TPS Section View in my product. So that I can import it into my drawing.
I am creating a plane from a part of a sub level assembly and trying to use it to create the section view.
So far this long I came. I am getting error in the last line...