Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Generate Balloons command disable when using code

Status
Not open for further replies.

AlvaroPers

Mechanical
Nov 29, 2020
30
Hello,

When creating a drawing document and adding a new view programmatically, I end up with the Balloon Generation button greyed out.
Instead, if I do the same manually, I can use the "generate balloons command".

Why the button is disabled when I use the code?



Sub CreateISOView(objProduct As ProductStructureTypeLib.Product)
objAppCATIA = GetObject(, "CATIA.Application")
objDrawingDoc = objAppCATIA.Documents.Add("Drawing")
objDrawingRoot = objDrawingDoc.DrawingRoot
objSheet = objDrawingRoot.ActiveSheet
objSheet.PaperSize = DRAFTINGITF.CatPaperSize.catPaperA2
Dim objViews As DRAFTINGITF.DrawingViews = objSheet.Views
Dim objView As DRAFTINGITF.DrawingView = objSheet.Views.Add("Vista")
Dim oViewLink As DRAFTINGITF.DrawingViewGenerativeLinks = objView.GenerativeLinks
Dim objGenerative As DRAFTINGITF.DrawingViewGenerativeBehavior = objView.GenerativeBehavior
oViewLink.AddLink(objProduct)
objGenerative.DefineIsometricView(-0.7, 0.7, 0, -0.4, -0.4, 0.81)
objGenerative = objView.GenerativeBehavior
objGenerative.Update()
End Sub


My purpose is to crate a isometric view with the code above, and then call the "Start command" c:Balloons
 
Replies continue below

Recommended for you

I already solved this.
It's just to have the current view as active and make a fit in all command.
closed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor