Balloons, ponits instead of planes for measurements
This commit is contained in:
parent
fef3a96bc4
commit
12d0749dba
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -3,6 +3,7 @@ Imports SldWorks
|
|||
Public Class Multiple_3D_Simplified
|
||||
Private Shared gratingParameters As DataRow
|
||||
Private Shared designName As String
|
||||
Public Shared listOfObsolete As List(Of Integer)
|
||||
|
||||
Public Shared partDT As New DataTable
|
||||
Public Shared Sub Build_Grid()
|
||||
|
|
@ -377,7 +378,7 @@ Public Class Multiple_3D_Simplified
|
|||
|
||||
|
||||
Private Shared Sub Delete_Obsolete()
|
||||
Dim listOfObsolete As List(Of Integer)
|
||||
|
||||
listOfObsolete = Find_Obsolete()
|
||||
|
||||
Dim swApp As SldWorks.SldWorks
|
||||
|
|
|
|||
|
|
@ -59,69 +59,69 @@ Public Class Multiple_Drawing
|
|||
If DR("CORNER") = 1 Then
|
||||
'A = horizontal uppåt, B = Veritcal vänster
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(0) += 0.01
|
||||
Create_Measurement("B", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SB", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(3) -= 0.01
|
||||
|
||||
ElseIf DR("CORNER") = 2 Then
|
||||
'A = Veritcal höger, B = horizontal uppåt
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(1) += 0.01
|
||||
Create_Measurement("B", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SB", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(0) += 0.01
|
||||
|
||||
ElseIf DR("CORNER") = 3 Then
|
||||
'A = horizontal nedåt, B = Veritcal höger
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(2) -= 0.01
|
||||
Create_Measurement("B", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SB", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(1) += 0.01
|
||||
Else
|
||||
'A = Veritcal vänster, B = horizontal nedåt
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(3) -= 0.01
|
||||
Create_Measurement("B", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SB", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(2) -= 0.01
|
||||
End If
|
||||
|
||||
ElseIf DR("RECESS TYPE") = "SQUARE" Then
|
||||
If DR("CORNER") = 1 Then
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@S2A", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(3) -= 0.01
|
||||
Create_Measurement("B", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@S2B", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(0) += 0.01
|
||||
|
||||
ElseIf DR("CORNER") = 2 Then
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@S1A", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(1) += 0.01
|
||||
Create_Measurement("B", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@S2B", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(0) += 0.01
|
||||
|
||||
ElseIf DR("CORNER") = 3 Then
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@S1A", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(1) += 0.01
|
||||
Create_Measurement("B", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@S1B", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(2) -= 0.01
|
||||
Else
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@S2A", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(3) -= 0.01
|
||||
Create_Measurement("B", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@S1B", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(2) -= 0.01
|
||||
End If
|
||||
|
||||
ElseIf DR("RECESS TYPE") = "SIDE SQUARE" Then
|
||||
If DR("SIDE") = 1 Then
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing) '
|
||||
Create_Measurement("B", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", False, mesOffsets(0), CompName, myView, recessName, swExtensions, iDrawing) '
|
||||
Create_Measurement("Point1@SB", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(1) += 0.01
|
||||
|
||||
status = False
|
||||
|
|
@ -130,13 +130,13 @@ Public Class Multiple_Drawing
|
|||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal - 1 + counter * Grating_Fill.numOfHorizontal)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
|
||||
plane2Name = "L2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
plane1Name = "A2@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SA2@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
|
||||
measurement = iDrawing.AddHorizontalDimension2(0, mesOffsets(0), 0)
|
||||
mesOffsets(0) += 0.01
|
||||
|
|
@ -145,8 +145,8 @@ Public Class Multiple_Drawing
|
|||
|
||||
ElseIf DR("SIDE") = 2 Then
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("B", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SB", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(2) -= 0.01
|
||||
|
||||
|
||||
|
|
@ -156,13 +156,13 @@ Public Class Multiple_Drawing
|
|||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1 - counter)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
|
||||
plane2Name = "W2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
plane1Name = "A2@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SA2@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
|
||||
measurement = iDrawing.AddVerticalDimension2(mesOffsets(1), 0, 0)
|
||||
mesOffsets(1) += 0.01
|
||||
|
|
@ -171,8 +171,8 @@ Public Class Multiple_Drawing
|
|||
|
||||
ElseIf DR("SIDE") = 3 Then
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("B", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SB", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(1) += 0.01
|
||||
|
||||
status = False
|
||||
|
|
@ -181,13 +181,13 @@ Public Class Multiple_Drawing
|
|||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1 - counter * Grating_Fill.numOfHorizontal)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
|
||||
plane2Name = "L2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
plane1Name = "A1@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SA1@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
|
||||
measurement = iDrawing.AddHorizontalDimension2(0, mesOffsets(2), 0)
|
||||
mesOffsets(2) -= 0.01
|
||||
|
|
@ -195,8 +195,8 @@ Public Class Multiple_Drawing
|
|||
Set_MeasurementProperties(measurement)
|
||||
Else
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("B", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", True, mesOffsets(3), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SB", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
mesOffsets(2) -= 0.01
|
||||
|
||||
|
||||
|
|
@ -206,13 +206,13 @@ Public Class Multiple_Drawing
|
|||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1) + counter)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
|
||||
plane2Name = "W2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
plane1Name = "A1@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SA1@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
|
||||
measurement = iDrawing.AddVerticalDimension2(mesOffsets(3), 0, 0)
|
||||
mesOffsets(3) -= 0.01
|
||||
|
|
@ -224,8 +224,8 @@ Public Class Multiple_Drawing
|
|||
ElseIf DR("RECESS TYPE") = "MIDDLE SQUARE" Then
|
||||
|
||||
iDrawing.ClearSelection2(True)
|
||||
Create_Measurement("A", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("B", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SA", True, mesOffsets(1), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
Create_Measurement("Point1@SB", False, mesOffsets(2), CompName, myView, recessName, swExtensions, iDrawing)
|
||||
|
||||
|
||||
|
||||
|
|
@ -236,13 +236,13 @@ Public Class Multiple_Drawing
|
|||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1 - counter)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
|
||||
plane2Name = "W2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
plane1Name = "A1@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SA1@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
|
||||
measurement = iDrawing.AddVerticalDimension2(mesOffsets(1), 0, 0)
|
||||
mesOffsets(1) += 0.01
|
||||
|
|
@ -255,13 +255,13 @@ Public Class Multiple_Drawing
|
|||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1 - counter * Grating_Fill.numOfHorizontal)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
|
||||
plane2Name = "L2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
plane1Name = "B2@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SB2@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
|
||||
measurement = iDrawing.AddHorizontalDimension2(0, mesOffsets(2), 0)
|
||||
mesOffsets(2) -= 0.01
|
||||
|
|
@ -291,10 +291,10 @@ Public Class Multiple_Drawing
|
|||
While status = False
|
||||
gratingName = modelsDT.Rows(i + counter * Grating_Fill.numOfHorizontal)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
plane1Name = "L1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "L2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SL1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
|
|
@ -310,8 +310,8 @@ Public Class Multiple_Drawing
|
|||
While status = False
|
||||
gratingName = modelsDT.Rows(counter * Grating_Fill.numOfHorizontal)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
plane1Name = "L1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SL1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
|
|
@ -319,8 +319,8 @@ Public Class Multiple_Drawing
|
|||
counter = 0
|
||||
While status = False
|
||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal - 1 + counter * Grating_Fill.numOfHorizontal)("partName")
|
||||
plane2Name = "L2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
|
|
@ -337,10 +337,10 @@ Public Class Multiple_Drawing
|
|||
While status = False
|
||||
gratingName = modelsDT.Rows(i * Grating_Fill.numOfHorizontal + counter)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
plane1Name = "W1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "W2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SW1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
|
|
@ -356,8 +356,8 @@ Public Class Multiple_Drawing
|
|||
While status = False
|
||||
gratingName = modelsDT.Rows(counter)("partName")
|
||||
iDrawing.ClearSelection2(True)
|
||||
plane1Name = "W1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
plane1Name = "Point1@SW1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
|
|
@ -365,8 +365,8 @@ Public Class Multiple_Drawing
|
|||
counter = 0
|
||||
While status = False
|
||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1) + counter)("partName")
|
||||
plane2Name = "W2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
counter += 1
|
||||
End While
|
||||
|
||||
|
|
@ -390,10 +390,10 @@ Public Class Multiple_Drawing
|
|||
Dim sheetScale = sheetProp(3)
|
||||
For i = 0 To Draw_Grating.DirSymbolPoints.Count - 2
|
||||
Dim x1, x2, y1, y2 As Double
|
||||
x1 = CDbl((Draw_Grating.DirSymbolPoints(i)(0) - Data.guiPanelMidX) / 200) + (swSheetWidth - 0.05) * sheetScale
|
||||
y1 = -CDbl((Draw_Grating.DirSymbolPoints(i)(1) - Data.guiPanelMidY) / 200) + (swSheetHeight / 2) * sheetScale
|
||||
x2 = CDbl((Draw_Grating.DirSymbolPoints(i + 1)(0) - Data.guiPanelMidX) / 200) + (swSheetWidth - 0.05) * sheetScale
|
||||
y2 = -CDbl((Draw_Grating.DirSymbolPoints(i + 1)(1) - Data.guiPanelMidY) / 200) + (swSheetHeight / 2) * sheetScale
|
||||
x1 = CDbl((Draw_Grating.DirSymbolPoints(i)(0) - Data.guiPanelMidX) / (20 * sheetScale)) + (swSheetWidth - 0.05) * sheetScale
|
||||
y1 = -CDbl((Draw_Grating.DirSymbolPoints(i)(1) - Data.guiPanelMidY) / (20 * sheetScale)) + (swSheetHeight / 2) * sheetScale
|
||||
x2 = CDbl((Draw_Grating.DirSymbolPoints(i + 1)(0) - Data.guiPanelMidX) / (20 * sheetScale)) + (swSheetWidth - 0.05) * sheetScale
|
||||
y2 = -CDbl((Draw_Grating.DirSymbolPoints(i + 1)(1) - Data.guiPanelMidY) / (20 * sheetScale)) + (swSheetHeight / 2) * sheetScale
|
||||
|
||||
skSegment = swSkMgr.CreateLine(x1, y1, 0, x2, y2, 0)
|
||||
Next
|
||||
|
|
@ -401,15 +401,110 @@ Public Class Multiple_Drawing
|
|||
|
||||
Dim note = iDrawing.CreateText2("Load Bearing Direction", (swSheetWidth - 0.075), (swSheetHeight / 2 + 0.012), 0, 0.003, 0)
|
||||
|
||||
|
||||
'For i = 0 To (Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1)
|
||||
' Dim obsoleteBool As Boolean = False
|
||||
' For j = 0 To Multiple_3D_Simplified.listOfObsolete.Count - 1
|
||||
' If i = Multiple_3D_Simplified.listOfObsolete(j) Then
|
||||
' obsoleteBool = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' If obsoleteBool = True Then
|
||||
' Continue For
|
||||
' End If
|
||||
|
||||
|
||||
' gratingCounter += 1
|
||||
'Next
|
||||
|
||||
status = swExtensions.SelectByID2(myView.GetName2, "DRAWINGVIEW", 0, 0, 0, False, 0, Nothing, 0)
|
||||
Dim vNotes As Object
|
||||
Dim autoBalloonParams As Object
|
||||
autoBalloonParams = iDrawing.CreateAutoBalloonOptions()
|
||||
autoBalloonParams.Layout = 1
|
||||
autoBalloonParams.ReverseDirection = False
|
||||
autoBalloonParams.IgnoreMultiple = True
|
||||
autoBalloonParams.InsertMagneticLine = False
|
||||
autoBalloonParams.LeaderAttachmentToFaces = True
|
||||
autoBalloonParams.Style = 1
|
||||
autoBalloonParams.Size = 2
|
||||
autoBalloonParams.EditBalloonOption = 1
|
||||
autoBalloonParams.EditBalloons = 1
|
||||
autoBalloonParams.UpperTextContent = 1
|
||||
autoBalloonParams.UpperText = """"
|
||||
autoBalloonParams.Layername = "Symbol"
|
||||
vNotes = iDrawing.AutoBalloon5(autoBalloonParams)
|
||||
iDrawing.ClearSelection2(True)
|
||||
|
||||
Dim gratingCounter As Integer = 1
|
||||
For i = 0 To vNotes.Length - 1
|
||||
Dim noteInfo = vNotes(i).GetLeaderInfo()
|
||||
Dim noteAnnotation As IAnnotation
|
||||
noteAnnotation = vNotes(i).GetAnnotation()
|
||||
noteAnnotation.SetPosition2(noteInfo(3), noteInfo(4), 0)
|
||||
noteAnnotation.SetLeader3(0, 1, False, False, False, False)
|
||||
|
||||
iDrawing.ClearSelection2(True)
|
||||
Dim balloonName As String = vNotes(i).GetName()
|
||||
status = swExtensions.SelectByID2(balloonName & "@" & myView.GetName2, "NOTE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
Dim editedNote = swExtensions.EditBalloonProperties2(1, 2, 0, gratingCounter, 0, "", 0, False, 1, "X", 0.001)
|
||||
gratingCounter += 1
|
||||
Next
|
||||
Dim a = 0
|
||||
'Dim noteInfo = vNotes(0).GetLeaderInfo()
|
||||
|
||||
|
||||
'Dim noteAnnotation As IAnnotation
|
||||
'noteAnnotation = vNotes(0).GetAnnotation()
|
||||
'noteAnnotation.SetPosition2(noteInfo(3), noteInfo(4), 0)
|
||||
'noteInfo = vNotes(0).GetLeaderInfo()
|
||||
'Dim a = 0
|
||||
|
||||
|
||||
|
||||
|
||||
''Balloons
|
||||
'Dim balloonStyle As Integer = 1
|
||||
'Dim balloonText As String = gratingCounter
|
||||
|
||||
|
||||
'Dim worldX As Double = swSheetWidth / 2 + ((2000 / 2) / 10) / 1000 - xOffset
|
||||
'status = swExtensions.SelectByRay(worldX, 0.153, 0, 0, 0, -1, 0.0005, 2, False, 0, 0)
|
||||
|
||||
'Dim BomBalloonParams As Object
|
||||
'BomBalloonParams = swExtensions.CreateBalloonOptions()
|
||||
'BomBalloonParams.Style = balloonStyle
|
||||
'BomBalloonParams.Size = 2
|
||||
'BomBalloonParams.UpperTextContent = 1
|
||||
'BomBalloonParams.UpperText = """"
|
||||
'BomBalloonParams.ShowQuantity = False
|
||||
'BomBalloonParams.QuantityPlacement = 1
|
||||
'BomBalloonParams.QuantityDenotationText = "X"
|
||||
'BomBalloonParams.QuantityOverride = False
|
||||
'Dim myNote = swExtensions.InsertBOMBalloon2(BomBalloonParams)
|
||||
|
||||
'Dim noteAnnotation As IAnnotation
|
||||
'noteAnnotation = myNote.GetAnnotation()
|
||||
'noteAnnotation.SetPosition2(worldX + balloonOffset, 0.13, 0)
|
||||
|
||||
'iDrawing.ClearSelection2(True)
|
||||
'Dim balloonName As String = myNote.GetName()
|
||||
'status = swExtensions.SelectByID2(balloonName & "@Drawing View" & i + 1, "NOTE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
'Dim editedNote = swExtensions.EditBalloonProperties2(balloonStyle, 2, 0, balloonText, 0, "", 0, False, 1, "X", 0.001)
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Shared Sub Create_Measurement(mesName As String, verticalDim As Boolean, mesOffset As Double, CompName As String, myView As View,
|
||||
recessName As String, swExtensions As SldWorks.ModelDocExtension, iDrawing As DrawingDoc)
|
||||
Dim status As Boolean
|
||||
Dim plane1Name As String = mesName & "1@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "PLANE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
Dim plane2Name As String = mesName & "2@" & CompName & "@" & myView.GetName2 & "/" & recessName & "-1@" & CompName.Split("-")(0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "PLANE", 0, 0, 0, True, 0, Nothing, 0)
|
||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||
|
||||
Dim measurement As IDisplayDimension
|
||||
If verticalDim = True Then
|
||||
|
|
|
|||
Loading…
Reference in New Issue