Moonbean Posted October 17, 2023 Share Posted October 17, 2023 hi is there any way another way of putting scale on drawing tile i.e floor plan (underneath the scale used in viewport) aside from field? i used the scale field, but if i dont copy the target viewport, it will not change, like i created a new viewport, but the scale field remains the same. is there a lisp that like a field but in addition, u click the new created viewport so that it will change as per new viewport? thanks in advance. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 17, 2023 Share Posted October 17, 2023 "Like i created a new viewport, but the scale field remains the same." When you add say a layout and a viewport using copy layout it will be looking at the original view port for scale, inside the field is an object ID, so to get scale of new viewport must change the ID of the field to current viewport. So need a lisp, pick field and if only 1 viewport is easy, more than 1 need a pick each, then update. The viewport has a variable called CUSTOMSCALE. So pretty easy to get at that and say make a Mtext. You need to look at what is returned for example I set scale 1=1 the custom scale returned was 1.0 Are you happy with mtext ? Or do you want it to change if scale is changed ? Must be done individually for every layout, can have a custom copy layout that will add scale. There is a scalebar dwg in CIV3D that can be used. That's about all I remember as we had scale blocks. What is best is say an example dwg with at least 2 layouts so can have a look. Ps I am metric with feet&inches a bit more involved. Quote Link to comment Share on other sites More sharing options...
Moonbean Posted October 18, 2023 Author Share Posted October 18, 2023 (edited) thanks Bigal ...but using custom scale is same as attribute. the thing is, some of my colleagues' viewports forgot to change what scale they used in the drawing title. and we got blasted from the boss... and in one sheet we used deferent scale in regards to spot detailing. attached is a jpeg clipping. thanks again... cheers Edited October 18, 2023 by Moonbean Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 18, 2023 Share Posted October 18, 2023 (edited) Ok understand as your metric it is easy. I am guessing that you have a fixed title block in a layout in my case it was always an A1 at true size 841x594 scale 1=1. So pick a viewport you can then get the variable "Customscale". It will return a number that matches the A1 viewport at 1:20. Next step is pick the block 5 ELEVATION and update the scale. If the detail/scale block is always in same location relevant to the mview then can also autofind and update. You can get the corners of the mview. An answer can be provided but need a dwg with a sample layout with multi views at different scales. Like image above but remove actual dwg objects, purge etc Just copy this line and paste to command line then pick a viewport. (vla-get-customscale (vlax-ename->vla-object (car (entsel "Pick viewport ")))) Paste again etc the value should change. You should be able to see a pattern for the scale it will be a function of say 1000/scale. Edited October 18, 2023 by BIGAL Quote Link to comment Share on other sites More sharing options...
Moonbean Posted October 19, 2023 Author Share Posted October 19, 2023 thanks' for trying Bigal... i greatly appreciated it. but it seems its more complicated. for me is ok, but attribute and edit might be easier for my co-workers as well. thanks again, God bless. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 19, 2023 Share Posted October 19, 2023 You can just have a command that updates all viewports in all layouts, just run before you save or close. Same as I had a zoom extents all layouts. Just need a dwg with a layout and your detail block in correct location. Please post. 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.