Jump to content

Elevation marker for 2d architectual drawings/sections


Butch

Recommended Posts

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)

Capture.JPG

Link to comment
Share on other sites

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.

image.png.d36d015aded66509b6ec1897c729b166.png

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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.png

dynamic marker block with anchor.dwg

Edited by Nikon
Link to comment
Share on other sites

 

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?

 

Image 5.png

 

 

 

Edited by Nikon
Link to comment
Share on other sites

@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)

 

  • Thanks 1
Link to comment
Share on other sites

"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)
)
)

 

  • Thanks 1
Link to comment
Share on other sites

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?

 

Image 8.png

Edited by Nikon
Link to comment
Share on other sites

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.

Image 1.png

 

Image 2.png

Edited by Nikon
Link to comment
Share on other sites

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?

 

Image 8.png

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.

Link to comment
Share on other sites

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 by Tsuky
Precison set to 2 decimale in code , Adding the +/- sign
  • Like 1
Link to comment
Share on other sites

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]: "))

 

Image 2.png

Edited by Nikon
  • Agree 1
Link to comment
Share on other sites

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..

  • Thanks 1
Link to comment
Share on other sites

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 by Nikon
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...