msakhaee Posted November 15, 2016 Posted November 15, 2016 Dear All, I need to draw a mline in a drawing and I' m going to close it as rectangle box. I command mode it is so easy but in VBA programming mode I have no idea. Is there any chance to do the matter Thx Manouchehr Quote
Dadgad Posted November 15, 2016 Posted November 15, 2016 Welcome to CADTutor Msakhaee. Does it have to be a multiline, or could it be created with the RECTANGLE command? If so, has the multiline style definition already been created specifying caps at both ends at 90 degrees? Something like shown in the screenshot? Quote
msakhaee Posted November 16, 2016 Author Posted November 16, 2016 Dadgad, Thx for reply. It should be Mline box. the standard style is acceptable. and there is no need to define a new style or modify the standard style. the most important matter is to close the Mline as a rectangle. Regards Quote
Dadgad Posted November 16, 2016 Posted November 16, 2016 (edited) I assume that you understand that the style as shown would do that automatically, and that if it was set as the current MLINE style on your machine, or included in your .dwt, you could just draw a single multiline and walk away? As simple as that seems, I wonder what is to be gained by doing it differently? There may well be a good reason, and I don't write code, just curious, as it seems pretty easy as described. Looking at the Preview box in the Mline Style Dialog box, you can see how easily it can be done. I guess my point is, that I see no need to create it in a style which is incompatible with what you want to do. Using it styled thusly, draw your line, it self closes, and get on with your next task. One advantage of doing it this way is that the entity is still an Mline, with nothing extra added. Edited December 6, 2016 by Dadgad Quote
msakhaee Posted December 5, 2016 Author Posted December 5, 2016 Dadgad, Thx for reply. Actually I will try to draw a double rectangle box. And it is not just a single rectangle box. For more information see attached file Regards Mline.dwg Quote
Dadgad Posted December 6, 2016 Posted December 6, 2016 Instead of drawing all four sides of the box, draw the first 3, then hit C for CLOSE, and the result will look like the left one in your drawing. Quote
msakhaee Posted December 6, 2016 Author Posted December 6, 2016 I Know how to draw it in command line but I 'm going to draw it via VBA. Quote
BIGAL Posted December 7, 2016 Posted December 7, 2016 Have a look at drawing plines and then offsetting may be a much easier way to go, or just draw as many multi lines as you need and like Dadgad have multiple options like close, end, break, join to another line, there is lots of lisp code out there for drawing multiple lines. I have 2 and 4 multi layered. VBA has been discussed many times as no longer being supported. You would see the masses descend on Autodesk if they stopped lisp. Quote
Dadgad Posted December 7, 2016 Posted December 7, 2016 Yeah BIGAL, I hear you, RECTANGLE command, OFFSET, done deal. I had been thinking that all along. Quote
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.