...Dim objSel As Selection, oSel As Selection
Set objSel = CATIA.ActiveDocument.Selection
objSel.Search ("Name=BNS*,all")
j = 2
For i = 1 To objSel.Count
Set prod1 = objSel.Item(i).LeafProduct
Set myParameters = prod1.Parameters
Dim element As...
Hello,
Is there any possiblity to loop through already opened .CATDrawing files in catia v5 using vba.
If yes please help me with code
I found below code but its counting sheets inside the same CATDrawing file.
Dim drawingDocument1 As Document
Set drawingDocument1 = CATIA.ActiveDocument
Set...
...Selection1 As Selection
Set myselection = drawingDocument1.Selection
'myselection.Search "CATDrwSearch.DrwBalloon,all"
myselection.Search "Name=*Text*,all"
j = 2
For i = 1 To oDrwView.Count
'For i = 1 To myselection.Count
Set selectedBalloon = myselection.Item(i).Value
Set myleaders =...
Hello,
Could some one help me to get the values from prodcut properties window.
sProd_Nom = MyProduct.Nomenclature
sProd_Def = MyProduct.Definition
with this i am getting only 2 but i need description and revision and all.
xpos = oDrwView.Item(i).x----Position based on view
ypos = oDrwView.Item(i).y----Position based on view
H = CurrentText.x---Position based on sheet
V = CurrentText.y---Position based on sheet
VIEW A6-6BEFORE/AFTER MODIFICATION
935.219970703125
350.777282714844
8914-HORIZONTAL...
xpos = oDrwView.Item(i).x
ypos = oDrwView.Item(i).y
this will give the postion of X Y co ordinates of balloons based on view.
H = CurrentText.x
V = CurrentText.y
this i thought this will give postion of Balloon based on sheet but its not happening.
Can you help me to get the postion from the...
...For numtxt = 1 To oDrwView.Item(i).Texts.Count
Set CurrentText = oDrwView.Item(i).Texts.Item(numtxt)
If CurrentText.Name Like "*Balloon*" Then
'ws.Cells(j, 1).Value = CurrentText.text
xpos = oDrwView.Item(i).x
ypos =...
Yes for drawing sheet we have grid or zone values like horizontal numbers and vertical Leterrs like shown below.
Its STD template so wanted to check if the text or balloon belongs to which Zone like "A1,B2,,," like that.
...For numtxt = 1 To oDrwView.Item(i).Texts.Count
Set CurrentText = oDrwView.Item(i).Texts.Item(numtxt)
If CurrentText.Name Like "*Balloon*" Then
'ws.Cells(j, 1).Value = CurrentText.text
xpos = oDrwView.Item(i).x
ypos =...
...j = 6
For i = 1 To oDrwView.Count
For numtxt = 1 To oDrwView.Item(i).Texts.Count
Set CurrentText = oDrwView.Item(i).Texts.Item(numtxt)
If CurrentText.Name Like "*Balloon*" Then
ws.Cells(j, 1).Value = CurrentText.text
j = j + 1
End If
Next numtxt
Next i
On Error GoTo 0
End Sub
...For numtxt = 1 To oDrwView.Item(i).Texts.Count
Set CurrentText = oDrwView.Item(i).Texts.Item(numtxt)
If CurrentText.Name Like "*Balloon*" Then
ws.Cells(j, 1).Value = CurrentText.text
j = j + 1
End If
Next numtxt
Next i
On...
Hello All,
Could you help me to Delete Useless elements from Geometrical sets in Catia using vba.
Here is my code which is double clicking on above part but need to double click on highlighted part and then click on Tools >> Delete unused elements
If (Mid(MyCurrPN, 18, 4) = "-BGE" Or...