FELIX Posted February 23, 2009 Share Posted February 23, 2009 I have a drawing in Map 3D with entities associated to object data (attributes). I have added text labels associated to each entity by querying the information from the object data. The issue I have is the placement of these text objects associated to polyline and/or LW polyline entities. Specifically, when the polyline/lw polyine is curved. Instead of the text being adjacent to the line on the polyline, it is placed in the center of the entities, which could be way off. I want to create a VBA script that will spin through all the polyline and lw polylines in a drawing and modify the text insertion point so that it will be placed on the midpoint of one of the line in the polyline. Preferably the line chosen will be the line that's either teh longest line segment of the polyline or the middle most line segment of the polyline. Once the insertion points of the polylines/lw polylines are modified, I plan to run the query again to relabel the polyline objects. I haven't been successful at finding anything close to what I want to do. Any help would be appreciated. I am new to AutoCAD and new to VBA. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted February 23, 2009 Share Posted February 23, 2009 Perhaps one of ASMI's brilliant tools will help you: http://www.asmitools.com/Files/Lisps/Talon.html :D Quote Link to comment Share on other sites More sharing options...
FELIX Posted February 23, 2009 Author Share Posted February 23, 2009 Thanks, Lee. Unfortunately, I don't understand AautoList. Though will look into it. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 24, 2009 Share Posted February 24, 2009 Check out here for "draw point along polyline" this puts a point a given distance along a pline, change it to put text instead. (last couple of days) If your plines are reasonably straight then when you pick the pline this could be used for the distance along the pline else you could do mid etc. You just get the distance of the pline start point with the pick point. Quote Link to comment Share on other sites More sharing options...
FELIX Posted February 24, 2009 Author Share Posted February 24, 2009 Thanks, BIGAL. Unfortunately, I'd like to do this in VBA. Not too familiar with Lisp. 2nd, I would like to automate the placement of the text without any user input. Basically, I'd like to spin through all the polylines (pline or lwpline) within the drawing and change their text insertion point. Appreciate your advice. 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.