Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

writing a script

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
303 Views, 6 Replies

writing a script

Hello everyone,
 
I have a question about writting a script that could automate my work in times when I have to do lots of same actions. 
 
I have a rail (a couple of kilometres long line). On that rail there are vertical lines crossing every 50-60 meters. On each crossing I want to put a circle with the same orientation to the rail. 
 
Any help appriciated Big smile
 
Marko
6 REPLIES 6
Message 2 of 7
pendean
in reply to: Anonymous

Is it 50 or 60? How would the program find out on its own, is there some sort or marker there? Or when is 69 used that 50 doesn't apply?
Macro writing is simply automating what you would type at the command line (with no mouse clicks), so more information or a DWG file sample might help those trying to help you.
Message 3 of 7
Anonymous
in reply to: pendean

Well, it is not always the same, that's why there are crossing vertical lines representing markers. On every crossing along the line I need to paste one object ( a circle with a line connecting it to the crossing ) exactly paralel on the vertical line with the ref point on the crossing. 

 

I hope you could follow me, tnx

Message 4 of 7
doni49
in reply to: Anonymous

Based on your last message, it sounds like you're looking to PLACE the markers.

 

So I'll re-ask Dean's question:  HOW would the macro decide WHERE to place these?  When you do it manually, how do YOU decide where to place them?



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 5 of 7
Anonymous
in reply to: doni49

So I should place the markers first ? I never used markes..

 

When I do it manually I copy with a ref point and then paste every 50-60 m where the vertical line crosses the main line .. 

Message 6 of 7
doni49
in reply to: Anonymous


@Anonymous wrote:

So I should place the markers first ? I never used markes..

 

When I do it manually I copy with a ref point and then paste every 50-60 m where the vertical line crosses the main line .. 


There is no autocad element called a "marker".  But the script will need SOMETHING tell it where to put these lines.  You can't tell it to put them "every 50-60 feet".  You could tell it to put them "every 50 feet", "every 53 feet" or any other number you come up with.  But a computer program needs to be told hard numbers -- or HOW to compute those numbers.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 7 of 7
Anonymous
in reply to: doni49

That's why i don't know how to use them I guess 😄

 

Well, the problem is the distances are random, so that won't do as a marker. I am triing to find a way how to tell autocad :  Put X  with orientation Bn on every crossing of line A with the line Bn   ?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost