Message 1 of 6
Not applicable
01-29-2019
11:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Previous employee set up iLogic rules to create orthographic views of a drawing. I'm not very familiar with iLogic rules so any help would be greatly appreciated!
fPath = ThisDoc.Path &"\" & iProperties.Value("Custom", "Activity_ID") & ".ipt" 'MsgBox(fpath) Dim oPartDoc As Document Dim oDrawDoc As DrawingDocument Dim oSheet As Sheet Dim oTG As TransientGeometry Dim oBaseView As DrawingView 'oPartDoc = Document(fPath) 'oPartDoc = ThisApplication.Documents.Open(fpath, False) oPartDoc = ThisApplication.Documents.Open(fpath,False) 'oPartDoc.Close 'MsgBox("spot1") oDrawDoc = ThisApplication.ActiveDocument 'MsgBox("spot2") oSheet = oDrawDoc.Sheets.Item(1) 'MsgBox("spot3") oTG = ThisApplication.TransientGeometry 'MsgBox("spot4") oPoint1 = oTG.CreatePoint2d(oSheet.Width*.75,oSheet.Height*.70) oPoint2 = oTG.CreatePoint2d(oSheet.Width*.75,oSheet.Height*.40) oPoint3 = oTG.CreatePoint2d(oSheet.Width*.25,oSheet.Height*.40) oPoint4 = oTG.CreatePoint2d(oSheet.Width*.25,oSheet.Height*.70) 'MsgBox("spot5") 'oBaseView = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint1, .005, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle, "Default") oIsoView = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint1, 1/iProperties.Value("Custom", "DWGScale"), ViewOrientationTypeEnum.kIsoTopRightViewOrientation,DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle) oIsoView.ShowLabel = False oBaseView = oSheet.DrawingViews.AddBaseView(oPartDoc, oPoint4,1/iProperties.Value("Custom", "DWGScale"), ViewOrientationTypeEnum.kTopViewOrientation,DrawingViewStyleEnum.kHiddenLineDrawingViewStyle) If oBaseView.Height > oBaseView.Width Then oBaseView.RotateByAngle(PI/2) End If oBaseView.ShowLabel = True oBaseView.Label.Position = oPoint2 iLogicVb.RunRule("View Label Update") oProjView = oSheet.DrawingViews.AddProjectedView(oBaseView, oPoint3, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle,1/iProperties.Value("Custom", "DWGScale")) oProjView.ShowLabel = False iProperties.Value("Custom", "DWGScale") = InputBox("Enter a new drawing scale for all views: 1/SCALE", "Create View",iProperties.Value("Custom", "DWGScale") ) 'MsgBox("spot1") If iProperties.Value("Custom", "DWGScale") = "" Then 'check for empty string 'MsgBox("spot2") Else If iProperties.Value("Custom", "DWGScale") <> vbOK Then 'check if OK button was clicked oIsoView.Scale = 1/iProperties.Value("Custom", "DWGScale") oBaseView.Scale = 1/iProperties.Value("Custom", "DWGScale") oPoint1 = oTG.CreatePoint2d(oSheet.Width*.75,oSheet.Height*.70) oPoint2 = oTG.CreatePoint2d(oSheet.Width*.75,oSheet.Height*.40) oPoint3 = oTG.CreatePoint2d(oSheet.Width*.25,oSheet.Height*.40) oPoint4 = oTG.CreatePoint2d(oSheet.Width*.25,oSheet.Height*.70) oBaseView.Label.Position = oPoint2 'Return 'exit rule Else End If 'MsgBox("spot3") iLogicVb.RunRule("Setup")
Solved! Go to Solution.