Butch Posted March 8 Posted March 8 Is there any lisp that can do this? I found LeeMacs but I would like another geometry of the marker and possibiliy to orient the text (left or right) Quote
BIGAL Posted March 10 Posted March 10 The simplest is 4 blocks L R U D, with 1 attribute. The text is in correct position. Could make all the bits using plines and text but block way easier. Quote
Butch Posted March 14 Author Posted March 14 Ok wich attribute would oyu use? Point object and the coordinates attribute? Tried that, but It only gives world coordinate system values...no way to define local system Quote
SLW210 Posted March 14 Posted March 14 I moved your thread to the AutoLISP, Visual LISP & DCL Forum. Please post in the correct forum. Quote
devitg Posted March 14 Posted March 14 6 hours ago, Butch said: Ok wich attribute would oyu use? Point object and the coordinates attribute? Tried that, but It only gives world coordinate system values...no way to define local system @Butch please upload your sample.dwg where you need to apply , and leeMac.lsp and what do you want the marker to be Quote
Nikon Posted March 15 Posted March 15 (edited) On 3/8/2024 at 5:33 PM, Butch said: I found LeeMacs but I would like another geometry of the marker and possibiliy to orient the text (left or right) @Butch As an alternative option dynamic marker block with anchor... dynamic marker block with anchor.dwg Edited March 15 by Nikon Quote
devitg Posted March 15 Posted March 15 @Nikon please upload leeMac.lsp or give us the lisp name or link at LeeMac Site Quote
Nikon Posted March 15 Posted March 15 40 minutes ago, devitg said: please upload leeMac.lsp or give us the lisp name or link at LeeMac Site https://lee-mac.com/elevationmarker.html ElevationMarkerV1-1.lsp Quote
Nikon Posted March 16 Posted March 16 (edited) On 3/16/2024 at 2:09 AM, Tsuky said: Another that you can try @Tsuky It is very convenient that you can select the measurement coefficient in this lisp, but... I have drawings in one file with different scales (M 100, M 50). In lisp, it is possible to set the conversion factor of measurements. If you set the Measurement conversion factor = 0.5 ( M 50), then at the next launch command markers are set with a coefficient of 0.5, and there is no way to choose another coefficient. Lisp remembers the previous settings. How can this be fixed? And also, how can I make the markers set the height in m? Edited March 22 by Nikon Quote
Tsuky Posted March 16 Posted March 16 @Nikon You can simply declare the "factor" and "suffix" variables locally to have the question asked each time you use it. Change (defun c:LEVEL-PT ( / pt ss e_ref ang obj# obj) To (defun c:LEVEL-PT ( / pt ss e_ref ang factor suffix obj# obj) 1 Quote
BIGAL Posted March 17 Posted March 17 "then at the next launch command markers are set with a coefficient of 0.5, " I would look at using Ldata to save the scale value in the dwg, it is dwg dependent not global. (if (= ahsc nil) (setq ahsc (vlax-ldata-get "AlanH" "ahscale")) ) ; need second test for ahsc is nil (if (ahsc nil) (progn (setq ahsc 50) (vlax-ldata-put "AlanH" "ahscale" ahsc) ) ) 1 Quote
Nikon Posted March 17 Posted March 17 (edited) 20 hours ago, Tsuky said: (defun c:LEVEL-PT ( / pt ss e_ref ang factor suffix obj# obj) @Tsuky Thanks! It worked!!! How can I make the markers set the height in m? Edited March 17 by Nikon Quote
Nikon Posted March 18 Posted March 18 (edited) On 16.03.2024 at 02:09, Tsuky said: level_pt.lsp Another good point about this code is: Markers are played horizontally if the orientation of the block is set to 90.0 or 270.0. Edited March 26 by Nikon Quote
Butch Posted March 18 Author Posted March 18 On 3/17/2024 at 7:48 AM, Nikon said: @Tsuky Thanks! It worked!!! How can I make the markers set the height in m? This is what I would alsno want. WOuld like that elevation markeres shows meters...basicaly its a scale divided by 100, because I draw everything in centimeters. Quote
Tsuky Posted March 19 Posted March 19 (edited) I think I have improved the code for correct operation. Possibilities for the reference block Provide the reference point Provide an angle for the block Provide an overall insertion scale for the block Provide a conversion factor for the measurement made (for example if the drawing is a centimeter, a factor of 0.01 will give the measurement in meters) And an optional suffix (as if the example above, we can put "m" to correlate.) Then we provide as many points to rate as we want. Normally can work in any UCS. If you want to continue a level dimension already carried out, simply choose the [Select] option when requesting the reference level and choose the reference dimension "0.00" to set up dimension linked to this reference (There can be several reference levels in the drawing) This retrieves the angle of the block, the scale of the block, the UCS of the block but not the conversion factor or the suffix: which allows you to make, for example, dimensions in centimeters and meters from the same reference point . I hope this will suit you... level_pt.lsp Edited March 21 by Tsuky Precison set to 2 decimale in code , Adding the +/- sign 1 Quote
Nikon Posted March 19 Posted March 19 (edited) 7 hours ago, Tsuky said: I think I have improved the code for correct operation. @Tsuky thank you very much for the improvement. I add to the first string "scale"... (defun c:LEVEL-PT ( / pt ss e_ref ang dxf_210 scale factor suffix obj# obj) and you can make a backlight to select the coefficients 0.01(cm) and 0.001(m) for M100 and 0.0005 (m for M50) (setq factor (getreal "\nMeasurement conversion factor?[1.0/0.01/0.001/0.0005]: ")) Edited March 19 by Nikon 1 Quote
Tsuky Posted March 19 Posted March 19 I leave it up to you to modify this to your liking, just arm (initget) with the keys that suit you. For my part, I prefer to leave the choice free because the options could be numerous, for example a conversion from centimeter to inch. Another thing I forgot to mention is that it is possible to reset the level points after the fact: simply move them (reference point included) and do a regen/regenall to update the fields. No need to erase them and start again in case of wrong position.. 1 Quote
Nikon Posted March 19 Posted March 19 (edited) 3 hours ago, Tsuky said: Another thing I forgot to mention is that it is possible to reset the level points after the fact: simply move them (reference point included) and do a regen/regenall to update the fields. No need to erase them and start again in case of wrong position @TsukyThanks for the clarification. This is a very smart and complex lisp. Your work is very valuable! It turns out that you can not only move, but also copy markers to other locations, regen: and fields will be updated... It's very convenient! Edited March 19 by Nikon Quote
Butch Posted March 20 Author Posted March 20 Is it possible to add a prefix like "+" or "-" signs? 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.