Visual LISP, AutoLISP and General Customization

*Expert Elite*
Posts: 5,237
Registered: ‎09-13-2004
Message 11 of 13 (184 Views)

Re: Line from origin to object centers

01-04-2013 12:52 PM in reply to: greenj1

greenj1 wrote:

Kent once again thankyou, this works perfectly on the circles I have tested it on.

However my circles have to be converted into 3D polylines. The lisp does not seem to work on them !

I assumed they would have an inserition point or centre and it would work the same way.

Any suggestions ?

No, they don't have a defined center or insertion point, just a string of vertices, and AutoCAD doesn't have any way to know directly whether they all fall on a common circular path.  But if they're geometrically regular, a center can be calculated.  This:

contains a method to do that.  Appropriate parts could be transferred, but it would make the code a lot longer.


On the other hand, if the conversion to 3DPolylines is done by something that always does it in the same way, e.g. it always makes a regular polygon with the same number of vertices [or even just always an even number of vertices] in each conversion, then we can assume some of what that routine tests for, and a much simpler way could be devised to calculate their centers.  Are they regular in some predictable way?

Kent Cooper
Active Member
Posts: 6
Registered: ‎01-03-2013
Message 12 of 13 (175 Views)

Re: Line from origin to object centers

01-05-2013 06:33 AM in reply to: Kent1Cooper

They dont seem to have any common propoerties. They start as circles then I import them into 3ds max and use bend and spherify modifers to turn the 2d layout into a spherical arrangement, then back into CAD where they become 3D polylines.


I guess I need to find an object which will retain a centre point or insertion point whne transfered between the two program. perhapes a point/node. Il see what I can find. Any suggestions welcome. Thanks for your help so far.

Active Member
Posts: 6
Registered: ‎01-03-2013
Message 13 of 13 (161 Views)

Re: Line from origin to object centers

01-05-2013 12:09 PM in reply to: greenj1

I found a MAXscript which placed point at the center of each spline (3d polylines in CAD) and bingo your lisp worked perfectly. Many thanks ! :smileyhappy:

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community