Hi @dparmarF6BDE
Try this approach. Input box for the start member name, inside the loop check the member name against the start member name, if it doesn't match go to next row when it finally matches, set start member name variable to nothing then the next row the start condition is bypassed and the loop continues as normal.
Dim memberName As String = InputBox("Enter the Membername you wish to Start the Loop", "iLogic", "A000000000")
If Not oRow.MemberName = memberName AndAlso Not memberName Is Nothing Then Continue For
memberName = Nothing
Sub Main
Dim oDrawing As DrawingDocument = ThisApplication.ActiveDocument
Dim oPath As String = "C\TRIAL" 'Folder to save the drawings
Dim oFactory As iPartFactory
For Each oView As DrawingView In oDrawing.ActiveSheet.DrawingViews
Dim oDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument
oFactory = oDoc.ComponentDefinition.iPartMember.ParentFactory
Exit For
Next
Dim memberName As String = InputBox("Enter the Membername you wish to Start the Loop", "iLogic", "A000000000")
If oFactory Is Nothing = False Then
For Each oRow As iPartTableRow In oFactory.TableRows
If Not oRow.MemberName = memberName AndAlso Not memberName Is Nothing Then Continue For
memberName = Nothing
For Each oView In oDrawing.ActiveSheet.DrawingViews
If oView.ActiveMemberName <> oRow.MemberName Then oView.ActiveMemberName = oRow.MemberName
oDrawing.Update
' Get the DXF translator Add-In.
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
' Check whether the translator has 'SaveCopyAs' options
If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "C:\temp\dxfout.ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If
'Set the destination file name
Dim dxfFileName As String = oPath & "\DXF\" & oRow.MemberName & ".dxf"
oDataMedium.FileName = dxfFileName
iLogicVb.RunRule("CENTERMARK REMOVAL")
iLogicVb.RunRule("CENTERMARK")
iLogicVb.RunRule("FIXED SCALE")
iLogicVb.RunRule("POSITION")
'Publish document.
DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
oDrawing.Update
Do While oView.IsUpdateComplete = False
Call ThisApplication.UserInterfaceManager.DoEvents
Loop
Next
oDrawing.SaveAs(oPath & "\IDW\" & oRow.MemberName & ".idw", True)
oDrawing.SaveAs(oPath & "\PDF\" & oRow.MemberName & ".pdf", True)
oDrawing.SaveAs(oPath & "\PDF\" & oRow.MemberName & ".pdf", True)
Next
End If
End Sub
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan