Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Daan_M
1322 Views, 3 Replies

Creating a Detail View in drawing with iLogic

Hi,

 

As the title suggests, im trying to make iLogic create a Detail View, like so (done manually with UI);

Daan_M_0-1597407002827.png

 

I have the following code:

	Dim oPointDetail As Point2d
    oPointDetail = oView2.Center
    oPointDetail.X = oPointDetail.X - 0.5 * oView2.Width
    
    Dim oCurveSeg As DrawingCurveSegment
    oCurveSeg = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Pick")
    Dim oCenterPoint As Point2d
    oCenterPoint = oCurveSeg.StartPoint

   
    Dim oDetailView As DetailDrawingView
    oDetailView = oSheet.DrawingViews.AddDetailView(oView2, oPointDetail, kFromBaseDrawingViewStyle, True, oCentrePoint, 1, , oView2.Scale * 3, True, "Detail A")

 

i ran into two problems:

 

1. i get an error with the cause 'wrong paramater', after looking at it i found out why;

Daan_M_2-1597407267701.png

The property 'StartPoint' returns nothing when the selected DrawingCurveSegment is circular (which mine is).

How can i work around this?

 

 

2. I use a manual picker to select a DrawingCurveSegment right now, which is fine for testing, but i want this automated. The segment i need a detail of is always the same, so the goal is to define that segment in my iLogic and assign it to oCurveseg

oCurveSeg = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Pick")

 

Thanks in advance.