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 JAE 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
Joined
Nov 29, 2020
Messages
30
Location
AR
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
 
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

Back
Top