gogi07 Posted September 5, 2009 Share Posted September 5, 2009 Dear all, I want to divide a polyline (LW or 3D) into equal no of parts using VBA. Kindly note that I do not want the user to select the line to be divided..there would be many lines which are selected at runtime and each of these need to be divided in same number of parts. An autolisp routine would also be helpful, if we can load it from VBA. The input to the autolisp should be selection set of the polylines from VBA and output be an array of co-ordinates of the divided polylines. I hope I am clear. Any suggsetions on how to solve the above? Quote Link to comment Share on other sites More sharing options...
SEANT Posted September 5, 2009 Share Posted September 5, 2009 There are a couple of options with regard to this type of task via VBA. The VBA api does not have a direct, build in procedure for this, but it can be custom built. See an excellent example for LWPoly division posted by Bryco in this thread: http://www.theswamp.org/index.php?topic=20677.0 That thread also mentions Frank Oquendo's Curve.cls, which should be readily available via web search. That class hooks into the same ActiveX functionality used by Visual Lisp. Unfortunatley, there seems to be an interconnect issue behind the scenes at AutoCAD’s end – routines based on this class have problems processing more than a dozen or so polys. As a side note: AutoCAD’s .Net api (VB.NET) has a lot more built functionality for these types of functions. The ‘at large’ opinion is that the time for exploring non VBA options is already upon us. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.