Jump to content

measure command in VB to collect XY at specific interval


priyanka_mehta

Recommended Posts

Hi all,

 

I need an autocad 'measure' like command in VBA.

Actually, what i need to do is; select a line, give some spacing value and collect X,Y at that interval.

So, I was thinking if i have a code for 'measure' command in VBA, may be i can use it for collecting X,Y of the points that are created at given interval.

 

Please suggest if there is any other way of doing it, or if i can get measure like command in VB.

 

Thanks and Regards,

Priyanka

Link to comment
Share on other sites

Its simple for a line just pick line then get start and end points and knowing distance required you can calculate x,y just repeat till you are longer than line length.

 

Just get the line angle.

In lisp (setq newpt (polar startpt angle dist)) (car newpt) is x (cadr newpt) is y

someone will give you the same code in VBA

Link to comment
Share on other sites

Hi,

 

I am really sorry, its not a line, it could be a polyline, or a spline or a polyline full of arcs; such that its not uniform, that was the reason i was thinking of getting the code for 'measure' command in VBA, since it plots points at uniform distance even on a spline.

 

 

Thanks a lot,

Priyanka

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...