• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

dynamic block to measure

  • Thread starter Thread starter snorky
  • Start date Start date

snorky

Guest
Hello everyone,
I have the need to "quote" distances on the z axis, for example I have scattered points and instead of using the "dist" command I would like to use a dynamic block containing 2 points, two moving actions and an attribute with the necessary formula, like this:
<\cobjprop.16.2 object(%<\_objid 1649756076128>%,1).coordinates \f "%lu2%pt4%pr2">%-%\acobjprop.16.2 object(%<\_objid 1649756076144>%,1).coordinates \f "%lu2%pt4%pr2"%

in which I take the quota z of the first item and subtract the share of the second item.

except the block and the text....

I load the block, move the lock points on the points of my interest (which obviously have different coordinates z) but the block points remain "fixed" on the "zero" plane preventing me from "measure".

Where am I wrong? must change approach? other solutions? Thank you!
 
Forgive me, do you just need to "know" the z value of the points or delta z between 2 points?
Code:
(defunc c:delta (/ pt1 pt2 delta_x delta_y delta_z)

(setq pt1 (getpoint "\nselect first point: ")
(setq pt2 (getpoint "\nselect second point: ")

(nth 0 pt2) (nth 0 pt1))
(Sectq delta_y (rtos (- (nth 1 pt2) (nth 1 pt1) 2))
(nth 2 pt2) (nth 2 pt1))

(princ "\n")
(princ "\n")
(princ (strcat "\n delta x: " delta_x))
(princ (strcat "\n delta y: " delta_y)
(princ (strcat "\n delta z: " delta_z)
(princ)

)
(princ "\n use delta to launch routine")
a simple lisp that displays the x-y-z delta between two points of your choice
 
Forgive me, do you just need to "know" the z value of the points or delta z between 2 points?
Code:
(defunc c:delta (/ pt1 pt2 delta_x delta_y delta_z)

(setq pt1 (getpoint "\nselect first point: ")
(setq pt2 (getpoint "\nselect second point: ")

(nth 0 pt2) (nth 0 pt1))
(Sectq delta_y (rtos (- (nth 1 pt2) (nth 1 pt1) 2))
(nth 2 pt2) (nth 2 pt1))

(princ "\n")
(princ "\n")
(princ (strcat "\n delta x: " delta_x))
(princ (strcat "\n delta y: " delta_y)
(princ (strcat "\n delta z: " delta_z)
(princ)

)
(princ "\n use delta to launch routine")
a simple lisp that displays the x-y-z delta between two points of your choice
I only need the delta z in a block with attribute (I have points scattered in xyz space and I must from time to time "quote" the height of an element regarding the surrounding ground, the height of a telephone pole compared to its foot, the height of a balcony compared to the curb, the height of a traffic light... I don't need to have their z compared to the global reference system but compared to a point I choose from time to time, that's why the dynamic block... I thought I could move 2 points in the block and calculate the delta z on an attribute.
 
I believe that with the block does not work because every time you insert/mode the internal name of the entities to which your "data fields" point, they change, so the finding of the information will be wrong.
 
I believe that with the block does not work because every time you insert/mode the internal name of the entities to which your "data fields" point, they change, so the finding of the information will be wrong.
I don't think... I have a block that I use to quote on the fly the points where I have 3 xyz attributes of a point placed at 0.0 in the dynamic block and the values of the attributes change consistently on all the existing blocks, must do the same using 2 points and doing the delta of the only z but I can't.... I put the isometric view to see and the behavior of the dynamic block and in fact the points move on the correct xy keeping z "0" and obviously the "game" does not work.. .
It seems strange that it doesn't work.. .
 
...the lock points remain "fixed" on the "zero" plane. . .
dynamic block parameters are two-dimensional, even by rotating 3d the block would always move and only on a plane, it could only work if said points lie on the vertical.
I did not understand if you mean two "objects" point, if so you could, please this solution:
- draws the two points and the related fielddata containing the formula of your first post that will display the difference of zeta quota
- copy the three objects and move the points on the tops that interest you, or create a group and copy it to the need, as the points in the groups can be moved individually. . .
- regen
 
dynamic block parameters are two-dimensional, even by rotating 3d the block would always move and only on a plane, it could only work if said points lie on the vertical.
I did not understand if you mean two "objects" point, if so you could, please this solution:
- draws the two points and the related fielddata containing the formula of your first post that will display the difference of zeta quota
- copy the three objects and move the points on the tops that interest you, or create a group and copy it to the need, as the points in the groups can be moved individually. . .
- regen
Yes, yes, two point objects that in the dynamic block I moved to pleasure. I'm trying to make a group now, thank you!

edit
2 difficulties. . .
- the attribute does not work out of the block
- points do not move individually once the group is created

Handle! !
 
Last edited:

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top