style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"PaulSchuepbach" <Hi
href="mailto:paul.schuepbach@morecam.ch">paul.schuepbach@morecam.ch>
wrote in message
href="news:f199a3f.-1@WebX.maYIadrTaRb">news:f199a3f.-1@WebX.maYIadrTaRb...
folks, I have a AssemblyDoc open and I want to create a dawing automatically.
Therefor I create a new idw, using the default template. The I want to add a
BaseView to the drawing. This all works fine, except when I want to create
this BaseView using 'kCurrentViewOrientation' enum - it creates a FronView
???? The other orientation-enum's work fine. Is this a bug ? Any idea for a
workaround ?
Best, Paul
i had the same problem
this helped me
Nacho
Automation & Design Engineer
Inventor Programmer (C#, VB.Net / iLogic)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Hi
thanks for the reply. i downloaded the ipt but there isnt any code inside. i looked via the vba editor
Please advise
Thanks
Nigel
Nacho
Automation & Design Engineer
Inventor Programmer (C#, VB.Net / iLogic)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
im using this code to create a flat pattern on a new drawing including scaling and stuff
i hope it is of some help
Dim ActivIdw AsDrawingDocument = m_InvApp.ActiveDocument
Dim oSheet AsSheet = ActivIdw.ActiveSheet
Dim BsVwScale AsDouble
Dim prtProterty AsPropertySet = prtDoc.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
Dim prtWidth, prtLength AsDouble
prtLength = prtDoc.PropertySets.Item("Design Tracking Properties").Item("Flat Pattern Length").Value
prtWidth = prtDoc.PropertySets.Item("Design Tracking Properties").Item("Flat Pattern Width").Value
If prtWidth > prtLength Then
BsVwScale = Math.Round(1 / ((oSheet.Width - 20) / prtWidth), 2)
Else
BsVwScale = Math.Round(1 / ((oSheet.Width - 20) / prtLength), 2)
EndIf
SelectCase BsVwScale
CaseIs < 0.2
BsVwScale = 5
CaseIs < 0.5
BsVwScale = 2
CaseIs <= 1
BsVwScale = 1
CaseIs < 2.5
BsVwScale = 0.4
CaseIs < 5
BsVwScale = 0.2
CaseIs < 10
BsVwScale = 0.1
CaseIs < 25
BsVwScale = 0.04
CaseIs < 50
BsVwScale = 0.02
CaseIs < 100
BsVwScale = 0.01
EndSelect
Dim oViewPos AsPoint2d = m_InvApp.TransientGeometry.CreatePoint2d(oSheet.Width / 2, oSheet.Height / 2)
Dim prtDocBaseView AsDrawingView
Dim oOptions AsNameValueMap = m_InvApp.TransientObjects.CreateNameValueMap
Call oOptions.Add("SheetMetalFoldedModel", False)
prtDocBaseView = oSheet.DrawingViews.AddBaseView(PrtToInsert, oViewPos, BsVwScale, ViewOrientationTypeEnum.kDefaultViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle, , , oOptions)
prtDocBaseView.DisplayThreadFeatures = False