alanjt Posted July 20, 2010 Posted July 20, 2010 I know that this thread was posted in the Customization section, but wouldn't the whole process be much simpler with the built in Layer Properties Manager. Folk are being spoilt with all this Lisp and are forgetting the basic AutoCAD You are absolutely correct, but for something as odd as changing the lineweights for all layers to a specific width, it seem more logical to streamline it. However, this could easily be accomplished through the GUI (even though I detest it) or the good old commandline version of the layer manager. eg. Command: LA -LAYER Current layer: "LOT-TEXT" Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck /Unlock/stAte/Description/rEconcile]: LW Enter lineweight (0.0mm - 2.11mm): 0 Enter name list of layers(s) for lineweight 0.00mm <LOT-TEXT>: * Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck /Unlock/stAte/Description/rEconcile]: and when you getting forward in programming you are not gonnal use or depend on Autocad manual tools. Thanks I have to disagree with you there. The day you stop utilizing core Autocad commands and just coding everything out, you are going to create an ungodly amount of work for yourself. People should earn the software and become proficient in their day-to-day work before worrying with "customized programming". The ONLY exception to that statement is Lee, because he doesn't actually 'work' in Autocad, only outside of school programming. However, and he'll agree to this, that on multiple occasions, someone has asked how to accomplish something and he'll post a nice routine to which someone will come along and state that there's a core/built-in way to accomplish the same thing. Lee, please don't take that as an attack, you were just a perfect example and an exception to the 'rules'. Quote
rkmcswain Posted July 20, 2010 Posted July 20, 2010 yes as I have mentioned before, I did use to actually added the (vl-load-com) at the top of the codes. So can we go back to the main issue Please Gents. ?? There is something wrong with your install then. Try running a repair. If that doesn't help, do a manual uninstall and then reinstall. Details on the manual uninstall can be found at http://support.autodesk.com/ Quote
alanjt Posted July 20, 2010 Posted July 20, 2010 Just to settle the curiosity, does anything return to the commandline when you type (vl-load-com)? Quote
Michaels Posted July 20, 2010 Author Posted July 20, 2010 Just to settle the curiosity, does anything return to the commandline when you type (vl-load-com)? Certainly, nothing. Quote
alanjt Posted July 20, 2010 Posted July 20, 2010 Hmm, and when you type: (vl-load-com) (vlax-get-acad-object) you get an error? Quote
Michaels Posted July 20, 2010 Author Posted July 20, 2010 Hmm, and when you type:(vl-load-com) (vlax-get-acad-object) you get an error? This is what I got ' ; error: no function definition: VLAX-GET-ACAD-OBJECT Quote
Lee Mac Posted July 20, 2010 Posted July 20, 2010 The ONLY exception to that statement is Lee, because he doesn't actually 'work' in Autocad, only outside of school programming. However, and he'll agree to this, that on multiple occasions, someone has asked how to accomplish something and he'll post a nice routine to which someone will come along and state that there's a core/built-in way to accomplish the same thing. Lee, please don't take that as an attack, you were just a perfect example and an exception to the 'rules'. No worries Alan, I completely agree with you. Coincidentally, I've just started a summer job doing a bit of CAD work and guess what: I've got to use LT... Quote
Lee Mac Posted July 20, 2010 Posted July 20, 2010 This is what I got ' ; error: no function definition: VLAX-GET-ACAD-OBJECT Perhaps see here: http://www.theswamp.org/index.php?topic=29484.0 or here: http://www.theswamp.org/index.php?topic=29707.0 Quote
alanjt Posted July 20, 2010 Posted July 20, 2010 No worries Alan, I completely agree with you. Coincidentally, I've just started a summer job doing a bit of CAD work and guess what: I've got to use LT... ROFL, irony is a cruel bi**h. Congrants on the job. What're you doing? Quote
Lee Mac Posted July 20, 2010 Posted July 20, 2010 ROFL, irony is a cruel bi**h. Tell me about it Congrants on the job. What're you doing? Cheers mate - just odds and ends really, but it helps with Uni so I'm happy. Quote
alanjt Posted July 20, 2010 Posted July 20, 2010 Tell me about it Cheers mate - just odds and ends really, but it helps with Uni so I'm happy. It truth, it will be really good for you to run CAD without the option to code. Quote
Lee Mac Posted July 20, 2010 Posted July 20, 2010 It truth, it will be really good for you to run CAD without the option to code. Exactly - it'll mean that I'll have to get to know the program a bit more... plus I'm using 2005 so no Object Snap Tracking - I can't believe how much I miss that. Actually I did have a quick question that I would've been able to code but couldn't work out how to do manually: I created a load of Page Setups in my Template (dwt), but these seem only to be available in ModelSpace, do I have to create Page Setups for each layout manually or is there a way to apply them to all layouts? Or am I completely missing the point here... ( very likely ). Quote
alanjt Posted July 20, 2010 Posted July 20, 2010 Exactly - it'll mean that I'll have to get to know the program a bit more... plus I'm using 2005 so no Object Snap Tracking - I can't believe how much I miss that. Actually I did have a quick question that I would've been able to code but couldn't work out how to do manually: I created a load of Page Setups in my Template (dwt), but these seem only to be available in ModelSpace, do I have to create Page Setups for each layout manually or is there a way to apply them to all layouts? Or am I completely missing the point here... ( very likely ). You should be able to select any available Page Setups, regardless of layout (see image). As far as applying them to all layouts, you are restricted to doing them manually. Alan (CAB) made a really nice routine for doing this, I use it quite a bit, but it won't help the LT user. Quote
Lee Mac Posted July 20, 2010 Posted July 20, 2010 You should be able to select any available Page Setups, regardless of layout (see image). As far as applying them to all layouts, you are restricted to doing them manually. Alan (CAB) made a really nice routine for doing this, I use it quite a bit, but it won't help the LT user. I thought as much, thanks mate. Quote
alanjt Posted July 20, 2010 Posted July 20, 2010 I thought as much, thanks mate.If you could get a list of the layouts, you could do a little scripting. Quote
Lee Mac Posted July 20, 2010 Posted July 20, 2010 If you could get a list of the layouts, you could do a little scripting. Scripting :( Quote
alanjt Posted July 20, 2010 Posted July 20, 2010 Scripting :(LoL, I'm sure you're going to become familiar with the .scr file and crappy macros. BOOO LT! Quote
Michaels Posted July 20, 2010 Author Posted July 20, 2010 (vlax-for x (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (vla-put-lineweight x lw) ) So why don't you complete the codes to be as one routine to give me the chance to study you VL-... codes as well as Lee's codes Mr. Alanjt ? Waiting for your mercey.... Michaels Quote
Lee Mac Posted July 20, 2010 Posted July 20, 2010 That is a complete code - just without the function definition. Alan handed it to you on a plate - what more do you want really? Quote
alanjt Posted July 20, 2010 Posted July 20, 2010 So why don't you complete the codes to be as one routine to give me the chance to study you VL-... codes as well as Lee's codes Mr. Alanjt ? Waiting for your mercey.... Michaels It's as complete as it needs to be. All you would need to do is specify the lineweight (I left it as the variable LW). 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.