blueshake Posted November 4, 2010 Share Posted November 4, 2010 hi,all I search the forum,and lee has wrote a lot of routine for this. but I found that it seems it don't play this trick.see the picture. is there any lisp can play this magic?thanks. Quote Link to comment Share on other sites More sharing options...
Tiger Posted November 4, 2010 Share Posted November 4, 2010 I can't see the picture at all, just get a big red X. Can you upload the image directly here instead? Or describe the issue? Quote Link to comment Share on other sites More sharing options...
blueshake Posted November 4, 2010 Author Share Posted November 4, 2010 sorry,update the picture host now. Quote Link to comment Share on other sites More sharing options...
Tiger Posted November 4, 2010 Share Posted November 4, 2010 So...what is it about your request that Lee's program can't do? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted November 4, 2010 Share Posted November 4, 2010 Use arctext command from Express menu . arctext Tharwat Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 4, 2010 Share Posted November 4, 2010 You can't with a single text item (without using the ArcAligned Text Custom Object from Express Tools), but I did experiment with the idea of using multiple items here: http://lee-mac.com/slinkytext.html Quote Link to comment Share on other sites More sharing options...
blueshake Posted November 4, 2010 Author Share Posted November 4, 2010 So...what is it about your request that Lee's program can't do? in this site http://lee-mac.com/slinkytext.html ,it work now. Quote Link to comment Share on other sites More sharing options...
blueshake Posted November 4, 2010 Author Share Posted November 4, 2010 Use arctext command from Express menu . arctext Tharwat arctext only work for arc,not any curve. Quote Link to comment Share on other sites More sharing options...
blueshake Posted November 4, 2010 Author Share Posted November 4, 2010 You can't with a single text item (without using the ArcAligned Text Custom Object from Express Tools), but I did experiment with the idea of using multiple items here: http://lee-mac.com/slinkytext.html that is what I want ,thank you. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 5, 2010 Share Posted November 5, 2010 that is what I want ,thank you. Happy I could be of assistance BlueShake. Quote Link to comment Share on other sites More sharing options...
m4rdy Posted November 5, 2010 Share Posted November 5, 2010 http://lee-mac.com/slinkytext.html Wow, finally......... Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 5, 2010 Share Posted November 5, 2010 Wow, finally......... Well - thanks for your comment, but it's less than ideal with individual text items - however, save creating a custom object in Arx, it was the best I could come up with... Quote Link to comment Share on other sites More sharing options...
blueshake Posted November 5, 2010 Author Share Posted November 5, 2010 hi,lee I test your codes.it is amazing. here comes my remark. can we arrange the string in average? e.g. I have a sting "ABCD" and I choose the curve (circle).then I may want to place them in average.see the picture.the same to any curve. anyway.that is just my thought. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 5, 2010 Share Posted November 5, 2010 hi,leeI test your codes.it is amazing. Thanks! here comes my remark.can we arrange the string in average? e.g. I have a sting "ABCD" and I choose the curve (circle).then I may want to place them in average.see the picture.the same to any curve. anyway.that is just my thought. By 'average', do you mean equispaced along the curve? If so, one could retrieve the length of the curve, divide by the number of characters in the string to get the spacing, calculate the points for each character and the first derivative of the curve at such points, then position accordingly. Lee Quote Link to comment Share on other sites More sharing options...
blueshake Posted November 5, 2010 Author Share Posted November 5, 2010 Thanks! By 'average', do you mean equispaced along the curve? If so, one could retrieve the length of the curve, divide by the number of characters in the string to get the spacing, calculate the points for each character and the first derivative of the curve at such points, then position accordingly. Lee yes. Lee,can you change your codes to do this if you are free?I don't have the ability to do this.:)thank you. Quote Link to comment Share on other sites More sharing options...
blueshake Posted November 7, 2010 Author Share Posted November 7, 2010 hi,Lee ,dig into your codes a little. here comes my confuse. 1.according to documents,we can use "strlen" function to get the length of a string. but if the sting contain wide char ,how can we can get the char numbers of a string. e.g. if the string is "abc" , the "strlen" return 3.so we can know that string "abc" has three chars. but if the string is "汉字", the "strlen" also return 4.but actually it only has two chars. do we have other way to get the char numbers of a string? 2.how can I get the length of a curve?? thank you for time. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 7, 2010 Share Posted November 7, 2010 1.according to documents,we can use "strlen" function to get the length of a string.but if the sting contain wide char ,how can we can get the char numbers of a string. e.g. if the string is "abc" , the "strlen" return 3.so we can know that string "abc" has three chars. but if the string is "汉字", the "strlen" also return 4.but actually it only has two chars. do we have other way to get the char numbers of a string? How about something like: (length (vl-string->list [i]<string>[/i])) 2.how can I get the length of a curve?? (vlax-curve-getDistatPoint entity (vlax-curve-getEndPoint entity)) Quote Link to comment Share on other sites More sharing options...
blueshake Posted November 8, 2010 Author Share Posted November 8, 2010 @Lee. it seems not work.still return 4. to achieve the function I mentioned above.I think we simple do the following steps. 1.select the curve and the string. 2.break up string a single char sets and stored them. 3.according to the counts of the char sets, resolve the equispaced points along the curve. 4.place the char in the relative point with a rotated point tangential angle. question: 1.how to break up the string. 2.how to get the equispaced points. 3.how to get the points' tangential angle in the curve. it seems complicated to me. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 8, 2010 Share Posted November 8, 2010 1) (mapcar 'chr (vl-string->list <string>)) 2) Get length of curve using: (vlax-curve-getDistatPoint entity (vlax-curve-getEndPoint entity)) Divide it by the number of characters to get spacing, then use vlax-curve-getPointatDist with the spacing as an increment. 3) (angle '(0. 0. 0.) (vlax-curve-getFirstDeriv entity (vlax-curve-getParamatPoint entity point))) Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 8, 2010 Share Posted November 8, 2010 Don't forget to account for direction of curve. 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.