Jord_91 Posted February 12, 2019 Posted February 12, 2019 Hi, I'm looking to make a script, lisp or batch sort I could take all the 3D drawing from a file and convert it to a 2d drawing. I've tried a lot of thing like "flatshot", "outbounding", "flatten"... The best result was definitely with the "Flatshot" command, but it cannot be use as a script or lisp (I might be wrong). Outbounding wasn't effective at all. So I came ou with the Flatten Function from the Express tools that i run in the Wscript of Lee Mac. I made all a routine that goes like this : _open *file* _-view _top -calque nouv 2D _ai_selall _Flatten no _change tout propriétés elév 0 tout propriétés Couleur jaune _change tout propriétés ca 2D _ai_selall _-overkill terminé PURGER TOUT * NON _AUDIT OUI _-VIEW _TOP _qsave _close The fact is that the weight of the files are always too big and the details are not as accurate as "Flatshot". I could also add wblock to the script but it still a pretty heavy file So finally, I would need to take my 3D file to become a flat 2D drawing on a specific layer and color (pretty simple to do). Here's an example of the furniture i would need to "transform" 3-MLE3060EFM.dwg, the flatshot finish Flatshot.dwg and the flatten script 3-MLE3060EFM.dwg. Sorry for my bad english and just notice that the command are in french or internationnal. Quote
Jord_91 Posted February 13, 2019 Author Posted February 13, 2019 (edited) My original drawing was this one. In fact, I would like to have the result of the Flatshot drawing without using the flatshot command as it's not possible to put it in a script or a lisp. I came out with this script sort of instead of only using the Flatten function trhat let me a drawing of over 1Mo I have a drawing of 105Ko what is really interesting but still not as acurate of the flashot command with a perfect 2D drawing and a lowet size of 39Ko. _open *file* _filedia 0 _-view _top _-layer off QUINCAILLERIE-BLANC off QUINCAILLERIE-SN off QUINCAILLERIE-CHR -Layer N 2D _ai_selall _AUDIT _yes _ai_selall 2FLAT 2flat _Flatten no _AUDIT _yes _change _all _prop _layer 2D _co yellow _ai_selall _-overkill _done _PURGE _all * n -purge r * n _AUDIT _yes _ai_selall _-overkill _done _PURGE _all * n _-purge r * n _AUDIT _yes _ai_selall _-overkill _done _PURGE _all * n _-purge r * n _-VIEW _TOP _filedia 1 Here is the 2Flat lisp I use in this script 2flat.lsp What's left for me is to ad a dot in each 4 corner of the drawing and to make a script to add the name of the dwg file in text attribute in the drawing (x,y,z) 0,-6,0... It may sound complicated but at the end the result should look like this. So I need to take my 3D and make a 2D of the top view of it. Clear sort it's the Lighter possible (it's why I put it on only one layer called 2D. Finally I need to add the text attribute that coppy the name of the file in it. Thx guy's I appreciate that you take the time to look at my post. Edited February 13, 2019 by Jord_91 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.