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

Draging line

KIMHENGHOR98
Advocate

Draging line

KIMHENGHOR98
Advocate
Advocate

I want to make a line which the start point is dragging a long polyline and the end point dragging for cursor.

 

please someone could help me <<<<<>>>>>

0 Likes
Reply
Accepted solutions (1)
525 Views
4 Replies
Replies (4)

tbrammer
Advisor
Advisor

I don't understand what exactly you are asking for. You want to make a line. So you need startpoint and endpoint.

What do you mean by: "start point is dragging a long polyline"? Do you have a given polyline, want to drag it's endpoint and then use the new endpoint as startpoint for the new line? 

 

If you have a given startpoint ptStart you could simply use acedGetPoint(ptStart, L"Endpoint:" ptEnd) to select the endpoint ptEnd. AutoCAD will draw a rubber-band line from ptStart to the cursor point then.

A more sophisticated and flexible approach is to use an jig (AcEdJig). See sample  <ArxSdk>\samples\database\elipsjig_dg.

 

At which point do you need help? Selecting the points? Implementing a jig? Creating the line entity?


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes

KIMHENGHOR98
Advocate
Advocate

I have a polyline the thing is : I want to create a line Enity derived from acdbPolyline but when I am drawing that entity it’s starting point is moving through that polyline while dragging its end point with cursor

0 Likes

tbrammer
Advisor
Advisor
Accepted solution

Check out the attached project. It is based on the sample <ARX>\samples\database\elipsjig_dg.

Compile, start AutoCAD and load the plineLine.arx. Make sure you have a polyline and a line in your drawing and enter "PLJ". Select the line then the polyline. 

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes

KIMHENGHOR98
Advocate
Advocate

Thanks you very much I understood how to use getClosestPointTo()

0 Likes