The anchor position was getting reset, so I just added this:
For i = 1 To DrwView.Texts.Count
DrwView.Texts.Item(i).AnchorPosition = catMiddleRight
Next
And everything works now. Thanks for the help!
Alright, I made it work. Here's the code:
Dim drawingDocument1 As DrawingDocument
Set drawingDocument1 = CATIA.ActiveDocument
Dim DrwSht As DrawingSheet
Set DrwSht = drawingDocument1.Sheets.ActiveSheet
Dim DrwView As DrawingView
Set DrwView = DrwSht.Views.ActiveView
Dim fact As Factory2D
Set...
Sorry, I understand the confusion now.
I'm trying make this automatic, no user input. I have 1000's of DXFs to mirror and can't have someone sitting there clicking. Thus the attempt at selecting the "symLine" after selecting all the other 2D geometry.
I'll keep working on forcing this selection.
That's not really helpful, least of which because I already know how to use Google. All I've found on all these different forums is the same line of code repeated over and over, and a MS article that states that the Application object is part of the generic VBA library reference which I've...
I've added as many libraries as I can but the "Wait" method is just not available to the "Application" object. Kind of scratching my head on this, since I see this particular line of code all over the place.
Alright, I'm real close here. I was able to run the Symmetry command with no error before but without selecting the axis (so the code would move on without completing the Symmetry command because I close the file), and I was also able to create the line without running the Symmetry command. If I...
I was able to step through the code and the problem seems to be that I can't select the Vertical or Horizontal axis. If I stop the code right there and just hand select the vertical axis, the symmetry command completes just fine.
Do you know what the search command is for the axis itself? I...
That command appears to be running but the code doesn't wait after the command call, it just moves on. It may have to do with the fact that I'm running a selection.Search "CATDrwSearch.2DLine, all" right before the Symmetry command, since I think that search will also select the...
Does anyone know the code to run the Symmetry command on all geometry in a DXF? I already have code to open the DXFs and to select all 2D lines with a search in the Drawing object but haven't quite figured out the Symmetry portion yet; the Automation help for CATIA (V5 R23) doesn't really seem...