aadityadengle
Mechanical
- Sep 4, 2013
- 15
All masters,
I am using script to generate drawing views as per my requirement. I have to handle a large number of models and will need drawings for individual parts.
what i am trying to do is to generate an isometric view. i am just using .DefineIsometricView(x1,y1,z1,x2,y2,z2) method for the same and it seems to be confusing me.
I cant get a proper view that i want (just like default isometric view in part or product workbench). My confusion is with X1,Y1,Z1,X2,Y2,Z2 values. what they stands for. are they co-ordinates? or i have to mention angle over there? or some kind of constants?
I want this view for Product and Parts. currently i am using following code. is there any thing to do with .setaxissystem? if yes then how to get axissystem of prodduct.
I am using script to generate drawing views as per my requirement. I have to handle a large number of models and will need drawings for individual parts.
what i am trying to do is to generate an isometric view. i am just using .DefineIsometricView(x1,y1,z1,x2,y2,z2) method for the same and it seems to be confusing me.
I cant get a proper view that i want (just like default isometric view in part or product workbench). My confusion is with X1,Y1,Z1,X2,Y2,Z2 values. what they stands for. are they co-ordinates? or i have to mention angle over there? or some kind of constants?
I want this view for Product and Parts. currently i am using following code. is there any thing to do with .setaxissystem? if yes then how to get axissystem of prodduct.
Code:
'-------------------------------------------------------------------------------------------------------
Dim DrgDoc As DrawingDocument
Dim PrtDoc As PartDocument
Dim PrdDoc As ProductDocument
Dim DrgSht As DrawingSheet
Dim DrgVew As DrawingView
Dim DrgCmp As DrawingComponent
Dim DrgDim As DrawingDimension
Dim DrgGenB As DrawingViewGenerativeBehavior
Dim InstName As String
Dim FlotDoc As Documents
Dim Nm
Dim ReturnVal As Integer
Private Sub CommandButton1_Click()
Set DrgDoc = CATIA.Documents.NewFrom(CATIA.FileSelectionBox("Select NewFrom Document for A.D.G.", "*.CATDrawing", CatFileSelectionModeOpen))
Set DrgSht = DrgDoc.Sheets.ActiveSheet
Set DrgVew = DrgSht.Views.Add("Isometric view")
Set DrgGenB = DrgVew.GenerativeBehavior
If Nm(UBound(Nm)) = "CATProduct" Then DrgGenB.Document = PrdDoc.Product
If Nm(UBound(Nm)) = "CATPart" Then DrgGenB.Document = PrtDoc.Part
DrgGenB.DefineIsometricView TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text
DrgVew.GenerativeBehavior.PointsProjectionMode = catPointsProjectionModeOn
DrgVew.X = 355
DrgVew.Y = 195
DrgSht.Scale2 = 0.5
DrgSht.Update
End Sub
'-------------------------------------------------------------------------------------------------------