Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Move UCS to selected intersection point (script)

Anonymous

Move UCS to selected intersection point (script)

Anonymous
No aplicable

Hi guys,

 

I'd like to create a script, which modify exported dxf file to required condition. Part of this script have to move UCS to selected point. Point is intersection of two lines, which have unique color (6 - magenta), but their position is variable accoding to specific dxf file. So I have been thinking about right sequence of commands and tried this:

 

SSX


C
6

POINT
APP
P
.....

 

I tried to select all objects with magenta color and save this selection. Then use it for define intersection point, but command "P" (previous) not working in this case. Do you have any ideas how I can solve it?

0 Me gusta
Responder
294 Vistas
1 Respuesta
Respuesta (1)

tramber
Advisor
Advisor

Well, script is more or less easy to deal with osnaping...

First, you have to consider OSNAPCOORD (2 or 0) and then to zoom quite above the intersection and then to give a INT to prior the snaping effect and then to specify a coordinate that wouldn't be too far and cross the thingers Emoticono sacando la lengua

 

In autolisp, you can use (inters p1 p2 p3 p4) not to snap but to calculate an intersection (between lines only).

 

Many options depend on your options :

  • can you clic the point or do you want it 100% automatic ?
  • do you create the objects you are "intersecting" by the script ?
  • are you preparing a 2 by 2 selection with SSX ? doesn't look serious....
  • etc

You see ?

You'd better ask for a lisp, wouldn't you ?

0 Me gusta