I am trying to retrieve the FamilyInstance FacingFlipped
I have 2 cases
case 1: if the wall is drawn from left to right and we place door the face flip value I get is "False"
case 2 : if wall is drawn from right to left and we place door the face flip value i get is "True"
does door face Flip Value Depends on the start and endPoint of wall?
On both cases wall is placed at top side of wall
The Orientation is based on the FamilyInstance.Orientation property - check out the original documentation here:
http://www.revitapidocs.com/2017/a11ec72c-2498-aaea-4b2e-2adac454856c.htm
I assume that if the current direction is the same as the XYZ returned from this property FacingFlipped will return "true" as opposed to "false"
Related
The goal is to enable the player to drow the patch for the character.
So I start with simple think, set value for cell(0, 0) in tilemap
and replace the value when the user clicks on it
and it works as expected.
But when I change the camera zoom and try it again it set value in another cell:
I was trying to multiple/divide the click position by the zoom value but it also not resolve the problem
Can anyone give me the hint on how should I handle that?
repo: Github
Once you zoom, the coordinates you get from the input event (screen coordinates) do not match the world.
If you have an input event, the recommended way to do this is with make_input_local:
tilemap.world_to_map(tilemap.make_input_local(event).position)
However, if you don't, but you have screen coordinates, you can do this:
var transform = tilemap.get_canvas_transform() * tilemap.get_global_transform()
tilemap.world_to_map(transform.affine_inverse() * screen_coordinates)
I get wrong orientation for skylight(a Window family instance) by FacingOrientation property.
FacingOrientation is normally same as the GeometryInstance.Transform.BasisY but in the case of
rooflight it seems that the correct orientation comes from BasisZ.
Any explanation?
I've seen this happen with other content when the content wasn't created correctly/consistently.
If you compare the family definition with another family, I suspect you'll find that the orientation of the planes used is backwards.
I'm after some advice re "how to determine which (object) control has been clicked"?
On mouse:over I hide the corner controls (and the border):
Image -> https://github.com/Robinyo/my-2d-diagram-editor/blob/master/client/content/images/my-2d-diagram-editor-with-ports.png
On mouse:down I use getCenterPoint() (of the mouse:over target) to start drawing a line:
Image -> https://github.com/Robinyo/my-2d-diagram-editor/blob/master/client/content/images/my-2d-diagram-editor-with-connections.png
On mouse:move I update the (connector) lines x2 and y2, and on mouse:up I use getCenterPoint() (of the mouse:over target) as the line's end point.
What I would like to do is use the nearest connect point (ml, mt, mr, mb) rather than getCenterPoint().
update to latest fabric js if your application allows it, because this fix is recent.
then on mouse up you can check for:
object.__corner
That should have value 'mt', 'mr'... and so on.
Be carefull that if i'm not wrong fabricjs check first for object, and then if it fails it check for corner click.
(target.containsPoint(xy) || target._findTargetCorner(pointer))
It means that it will first check for the bounding box and then for the corners. In other words the corner targeting will work just in the outer part of the corner.
I have a silverlight application that contains Bing map.
I want when the user clicks on someplace on the map to show him the lat/long of the point where he clicked. is that possible ? and how?
This is very easy to do. I am assuming you know how to set up a mouse handler on the map. The parameter on the handler is of type MapMouseEventArgs, which contains the ViewportPoint Property, which is just an instance of the Point object documenting where on the viewport/map the click occured. You need to translate this viewport point to lat/long coordinates. To do this, use the ViewportPointToLocation Method on your Map object, which as the name implies translates your viewport point to a Location(lag/long) object. After you get the lag/long, just show it to the user however you'd like.
Moving items from right to left causes the elements to go to the bottom of the rich:pickList
Assuming I have 5 elements in my pick list and the left hand side shows up as (1,2,3,4,5) and I move to items from the top to the right side.
The list appears as follows left hand side (3,4,5) and right hand side (1,2).
If I move 2 back to the lef, the list appears as follows
left hand side (3,4,5,2) and right hand side appears as (1)
Is there a way to make the "2" item go back to its original position, so that the list appears as (2,3,4,5) instead?
you can use Sorting option.
implicit call: instead of ArrayList() use TreeSet(comparator).
client side you just need to reRender on listChanged
explicit call: suppose you do not want to use TreeSet as mentioned above.
then call an a4j action method on listChanged sort ArrayList
like Collections.sort(list, compartor);
Hope this helps.