
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
Currently, I have a code in a line for adding a baseview, it reads:
SyntaxEditor Code Snippet
oView1 = oSheet.DrawingViews.AddBaseView(oModel,oViewLoc, oViewScale, ViewOrientationTypeEnum.kLeftViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle)
Right now, for development purposes, I have oModel as a part document that is specified by a string for the pathname, i.e.
SyntaxEditor Code Snippet
Dim oModel As PartDocument Dim oModelName As String = "C:\Users\buntroh\Documents\Seal sleeve 2.ipt" oModel= oDocs.Open(oModelName, False)
However, I want to replace this string with the filepath of a part file that is open in the same collection of documents.
To clarify, just like how when you normally start a new drawing after finishing a part in a part file, the drawing automatically recognizes that 'newly created' model as the model to use when placing a new view. I just want to achieve the same thing (except since I am using iLogic to place the views, I have to specify the model document to use when placing the view).
Currently I have a rule that in my part document that is triggered when the user presses "Create Drawing". The rule prompts the user to save and then it opens up the drawing template. If theres a way to pass the newly created file path into my drawing document, that would be amazing.
Thanks
Solved! Go to Solution.