Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
Hope Everyone is well,
This may be a bit of a jump got most of this done.
I think it may have to be 2 rules but its worth a try.
From Drawing.
1. Select View. (done)
2. Open That Assm. (done)
3. Add a REP Name (done)
4. do something to that open Assm.
5. save that and close it
6 using the Selected View from step 1.
7 set that view to the new REP
This is where i am at the moment.
was not sure if i could pause the rule to accomplish step 4 then continue on.
Steps 4 may have to be the stop
and a rule set for 6-7
any help would be great.
V/r,
-G
Dim oView As DrawingView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select View") Dim oTargetView As String If oView Is Nothing Then Exit Sub Dim oModelDoc As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument Dim oViewModelName As String = oModelDoc.DisplayName Dim oFullFilePath As String = oModelDoc.FullFileName oTargetView = oFullFilePath 'MsgBox(oViewModelName) 'MsgBox(oFullFilePath) 'MsgBox(FullFileName) Dim oFolderPath As String = Left(oFullFilePath, (InStrRev(oFullFilePath, "\", -1, vbTextCompare) -1)) 'ThisApplication.Documents.Open(oViewModelName, True) ThisApplication.Documents.Open(oTargetView) '''xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 'define current document Dim openDoc As Document openDoc = ThisDoc.Document 'set a reference to the assembly component definintion. 'this assumes an assembly document is open. Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition 'define view rep Dim oViewRep As DesignViewRepresentation 'define an arraylist to hold the list of view rep names Dim NameList As New ArrayList() 'Look at the view reps in the assembly 'For Each oViewRep In oAsmCompDef.RepresentationsManager.DesignViewRepresentations 'set the list of names to the array list 'NameList.Add("Weld Track2") 'Next 'check for a Default view rep and create it if not found If Not NameList.Contains("Default1") Then 'create Default view rep oViewRep = oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Add("Weld Track") oViewRep.ShowAll oViewRep.Activate End If 'zoom all ThisApplication.CommandManager.ControlDefinitions.Item("AppIsometricViewCmd").Execute
Solved! Go to Solution.