Login Page - Create Account

Support Board


Date/Time: Tue, 06 May 2025 07:32:36 +0000



Post From: ACSIL: Updating / resetting a tools BeginIndex and EndIndex

[2024-12-21 13:49:17]
User92573 - Posts: 560
Dear Support

Please can you offer some guidance on the following?

I have and existing drawing:

// Snippet.

if(r_LineNumber_Horizontal_Tool != 0)
Tool.LineNumber = r_LineNumber_Horizontal_Tool;

Tool.DrawingType = DRAWING_HORIZONTAL_LINE_NON_EXTENDED;
Tool.BeginIndex = TOOL_INDEX_POINT_1;
Tool.EndIndex = TOOL_INDEX_POINT_1 + 10; // initial index location

r_LineNumber_Horizontal_Tool = Tool.LineNumber; // Remember line number which has been automatically set.




I'd like to reset it using an index value held in TOOL_INDEX_POINT_2.

The following code runs on an event.

  if(r_LineNumber_Horizontal_Tool != 0)  
  {  
    s_UseTool Change_Line_EndIndex;
  
      sc.GetUserDrawnDrawingByLineNumber(0, r_LineNumber_Horizontal_Tool, Change_Line_EndIndex);      
      Change_Line_EndIndex.EndIndex = TOOL_INDEX_POINT_2;

    sc.UseTool(Change_Line_EndIndex);

    
    // The following confirms all values are correct an in place.

    msg.Format("TOOL_INDEX_POINT_1 %i, TOOL_INDEX_POINT_2 %i, r_LineNumber_Horizontal_Tool %i ",TOOL_INDEX_POINT_1,TOOL_INDEX_POINT_2,r_LineNumber_Horizontal_Tool);
    sc.AddMessageToLog(msg,1);

}

But there is no change in the lines length?

Any help appreciated as I'm a little lost.