pKayy
Mechanical
- Mar 28, 2016
- 44
Hi guys,
Can't seem to find a specific solution for this anywhere on the internet... Maybe you guys can help.
We use a macro here to create text and paste it onto an existing sketch in the part body. This macro works fine, but I want to tweak it a bit and flip the orientation of the text before pasting. This text is scribed into an ID plate which will leave an impression in the foam, therefore, the text must be reversed.
I've included the section of code that copies the text in a DXF file and pastes it onto the part sketch.
'Copy text---------------------------------------------------------------------------------------------------
'Set drawingDocument1 = CATIA.ActiveDocument
'Set selection1 = drawingDocument1.Selection
Set selection1 = drawingdocument2.Selection
selection1.Search "Name=Poly*,all"
selection1.copy
'Switch to Part again---------------------------------------------------------------------------------------
Original_part.activate
'msgbox "Now you can paste the text into a sketch"
'selection1.paste
selection2.Add sketch1
selection2.paste
set mypart=original_part.part
Thanks!
Can't seem to find a specific solution for this anywhere on the internet... Maybe you guys can help.
We use a macro here to create text and paste it onto an existing sketch in the part body. This macro works fine, but I want to tweak it a bit and flip the orientation of the text before pasting. This text is scribed into an ID plate which will leave an impression in the foam, therefore, the text must be reversed.
I've included the section of code that copies the text in a DXF file and pastes it onto the part sketch.
'Copy text---------------------------------------------------------------------------------------------------
'Set drawingDocument1 = CATIA.ActiveDocument
'Set selection1 = drawingDocument1.Selection
Set selection1 = drawingdocument2.Selection
selection1.Search "Name=Poly*,all"
selection1.copy
'Switch to Part again---------------------------------------------------------------------------------------
Original_part.activate
'msgbox "Now you can paste the text into a sketch"
'selection1.paste
selection2.Add sketch1
selection2.paste
set mypart=original_part.part
Thanks!