Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Views from 3D

Status
Not open for further replies.

Jegsaran

Automotive
Joined
Dec 16, 2020
Messages
42
Location
IN
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

Code:
Set drawingSheets1 = drawingDocument1.Sheets
Set drawingSheet1 = drawingSheets1.ActiveSheet
Set drawingViews1 = drawingSheet1.Views
CATIA.StartCommand "View from 3D"
Set oParentDoc = CATIA.Documents.Item("DC-SectionCut-TemplateDoc.CATProduct")
oParentDoc.Activate
Set ActDoc = CATIA.ActiveDocument
Set Sel2 = ActDoc.Selection
Sel2.Search "Name=*Section Cut View1*,all"

Post this CATIA is asking me to click on the screen.
Since the view is not generated using traditional method I can't use drawingViewGenerativeBehavior1.Update also.

I tried CATIA.StartCommand "Select" but it is not working appropriately. Is there any workaround to click on the screen?

 
Thanks for sharing this LWolf. Both the links is about creating Isometric view.
All I need is to import an Annotation(TPS) Section Cut View which is already created in the product.
When I import it into Drawing it'll come as Section Cut.
The main theme here is to eradicate creating Front View to create section cut.
 
Did some workaround it is working now,

Code:
    CATIA.StartCommand "View from 3D"
    Set oParentDoc = CATIA.Documents.Item("DC-SectionCut-TemplateDoc.CATProduct")
    oParentDoc.Activate
    Set ActDoc = CATIA.ActiveDocument
    Set Sel2 = ActDoc.Selection
    Sel2.Search "Name=*" & IndivAssySecCut(i) & "*,all"
    inputObjectType(0) = "AnyObject"
    Status = oSel.SelectElement2(inputObjectType, "Click Screen & Select a Sheet", False)[indent]'asked the user to select the sheet from tree[/indent]
    DoEvents
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top