I am struggling understanding how I can utilize the passthrough node to control workflow in my dynamo script. See my attempts below to control work flow with the passthrough node and sastrugi node:
When the above is run, the correct order of operations occur, but I get stuck in an infinite loop in the Pick Points on Workplane node. Hitting escape (to exit the command) only yields the pop up box again. No dice, not sure what is going wrong
Remove Passthrough attachment to Pick Points on Workplane node. This does not work as the Pick Points on Workplane node begins at the start of the code
Adding another passthrough node. This does not get workflow in the correct order either. This does not work as Pick Points on Workplane node begins at the start of the code.
Any idea on where I am going wrong? As an FYI, the elements going into the passthrough port are line data.
I have just tested that the node works when using v2.0 (releases for Sastrugi are still only tested forv1.3) to see if the python coding could be an issue, but am able to pick points as per the intended process of the node. @austin.guter Can you upload your dyn?
I have a suspicion that the Transaction.Start/End nodes are intefearing with the UI.Doc selection process…
An example of what I am shooting for is located here (rotating first, moving second now):
As an FYI, I was able to solve the infinite loop part of my problem with a few more passthrough nodes, but my Sastrugi node still prompts too early in the script.
Key thing here is I need to my point picking data (from Sastrugi Pick Points pop up box) off of the created model line locations. When I run the script you gave me, the Sastrugi Pick Points pop up box happens before the creation of the model line data.
This is seems to be counter intuitive to me given we have so many passthrough nodes in the dynamo graph… not sure what the issue is.
A long video of the interaction, as you can see the pick point pop up box occurs too early (see time stamp around 55 seconds for pop up before model line geometry creation).
@Ewan_Opie, sorry to dig up a somewhat dead thread, were you able to review last (2) posts?
The passthrough node is quite mysterious to me and I cannot understand why the order of operations occur in the order that is shown in the video I posted.
Could you help me? Which package is the “Pick point on workplane” node from? I couldn’t find it.
So, the order of the routine would be the first routine as input, then commit with Transaction.Start, Model curve, and Transaction.End (always the Model curve? Or can I just place the Watch between them?)
Then the dialog box in the same order, followed by the other routine, etc… Is this sequence always the same, regardless of the type of routine?
I tried to do it for some basic routines, but it didn’t work.
It would be: creating walls from reference lines.
Creating environments, creating floors.
If you can help me, I would greatly appreciate it!
The Pick point on workplane is a custom node and not from a package. If I understand correctly, it’s basically just a regular pick point function that can only be executed in a view where the workplane has been set. If you just need to pick a point in space then you can use the code below for that. Whatever message you input into the string is what will show on the pop up message. Again, the workplane must be set in the view or the code will error.
As far as your other questions, I would start a new thread and be a little more detailed about what you are trying or wanting to do. That will warrant more attention from the forum members. You can reference this original thread in it.
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import TaskDialog
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
TaskDialog.Show('Pick Point', IN[0])
pt=uidoc.Selection.PickPoint()
if pt != None:
dy=Point.ByCoordinates(pt.X,pt.Y,pt.Z)
rtn=[dy]
else:
rtn=[None, None]
OUT=rtn