Drawing view offset automation

Drawing view offset automation

Anonymous
Not applicable
580 Views
3 Replies
Message 1 of 4

Drawing view offset automation

Anonymous
Not applicable

Hello,

 

I would like to know drawing view offset automation using ilogic.

In detail,

 

After I place a base view in .idw, when I place next view whether on right, left, top, bottom, I need ilogic code, which will popup dialog box, where I can enter desired offset, so the respective view will be placed accordingly.

Please help me on same.

 

 

0 Likes
581 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

Hello All,

 

Could you please reply to this post

0 Likes
Message 3 of 4

rikard.nilsson
Collaborator
Collaborator
Hi,

I think that the only way to solve this is to write your own function for this. I don't think it's possible to have this embedded with ordinary project view command.

And it's always easier to help you with coding if you have questions about your coding that you done already.

If you haven't started yet I can give you a tip to read the API help. There are some examples of placing views and there are some examples if you search this forum.

Regards
Rikard
0 Likes
Message 4 of 4

dan_inv09
Advisor
Advisor

 

Public Sub PlaceBaseView(ByRef sheet As Inventor.sheet, _
                        ByRef assyDoc As AssemblyDocument, _
                        ByRef ctrpoint As Point2d, _
                        ByRef viewName As String)

    'define view orientation
    Dim vieworient1 As ViewOrientationTypeEnum
    Let vieworient1 = ViewOrientationTypeEnum.kFrontViewOrientation

    'define view style
    Dim viewstyle1 As DrawingViewStyleEnum
    Let viewstyle1 = DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle
    
    Dim oFaceView As DrawingView
    Set oFaceView = sheet.DrawingViews.AddBaseView(assyDoc, ctrpoint, 0.5, vieworient1, viewstyle1, viewName)

End Sub

            Dim oPoint1 As Point2d
            Set oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(ptx, 11)
            
            Call PlaceBaseView(oSheet, assyDoc, oPoint1, oDesView.Name)

 

 

 

0 Likes