Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

.DefineIsometricView(x1,y1,z1,x2,y2,z2) query

Status
Not open for further replies.

aadityadengle

Mechanical
Sep 4, 2013
15
IN
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.

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
'-------------------------------------------------------------------------------------------------------
 
Replies continue below

Recommended for you

In above query if you consider axis system that is by default in part or product workbench, PLANE YZ IS MY FRONT VEIW AND PLANE XY IS MY TOP VIEW
 
Those six values define a vector, and the vector is the "line of sight" of the view. (The vector is normal to the viewing plane.)

The six values are really two coordinates. X1,Y1,Z1 is the coordinate of the first end of the vector; X2, Y2, Z2 is the coordinate of the other end of the vector.

The standard and true isometric view can be defined as 1, 1, 1, 0, 0, 0.
 
1,1,1,0,0,0 didn't work
got some result on 1,-1,0,0,1,1 but view is from backword (left side's back top corner). I will need to have view form right side's(of the observer) front top corner.
 
You haven't given us enough information to figure out the values for you. Can you attach a picture of your part including the axis system?

Otherwise,keep playing with the values, changing the polarity (+ or -).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top