Donate Now Goal amount for this year: 3000 USD, Received: 1207 USD (40%)

Results 1 to 7 of 7
Like Tree4Likes
  • 1 Post By GMcDowellJr
  • 2 Post By Twiceroadsfool
  • 1 Post By elton williams

Thread: Any way to prevent "divide by zero" from locking up Dynamo entirely?

  1. #1
    Member PatrickGSR94's Avatar
    Join Date
    July 7, 2017
    Location
    Hernando, MS
    Posts
    442
    Current Local Time
    12:12 PM

    Any way to prevent "divide by zero" from locking up Dynamo entirely?

    Doing some tutorials right now where I have a code block that divides x by y. For the Y input I have a number slider. I've run into the problem of accidentally moving the slider to zero, with Dynamo set to Automatic, locks up the program completely. I have to shut it down, shut Revit down, everything, and then open up everything again. Why doesn't it just give an error message or something?

  2. #2
    Member PatrickGSR94's Avatar
    Join Date
    July 7, 2017
    Location
    Hernando, MS
    Posts
    442
    Current Local Time
    12:12 PM
    Oh okay I found the "Minimum" value field underneath the slider. Still it seems weird that divide by zero would lock up the whole thing instead of just generating an error, like a red node or something.

  3. #3
    Forum Addict GMcDowellJr's Avatar
    Join Date
    December 21, 2010
    Location
    Phoenix, AZ
    Posts
    2,556
    Current Local Time
    10:12 AM
    Might be the node you're using. I just did a bunch of division, some by zero, and didn't lock up. Instead I get NaN (Not a Number).


    Sent from my iPhone using Tapatalk
    amoursol likes this.

  4. #4
    Member PatrickGSR94's Avatar
    Join Date
    July 7, 2017
    Location
    Hernando, MS
    Posts
    442
    Current Local Time
    12:12 PM
    Quote Originally Posted by GMcDowellJr View Post
    Might be the node you're using. I just did a bunch of division, some by zero, and didn't lock up. Instead I get NaN (Not a Number).


    Sent from my iPhone using Tapatalk
    I just used a regular number slider, and connected it to a Code Block with "x/y" as the code, number slider connected to the Y input. Several other nodes went into the X input.

  5. #5
    Forum Co-Founder Twiceroadsfool's Avatar
    Join Date
    December 7, 2010
    Location
    Dallas, TX
    Posts
    10,036
    Current Local Time
    12:12 PM
    Hehehe. Welcome to Dynamo. A ton of stuff will shag dynamo or make Revit crash. I almost never leave it on automatic.

    Sent from my Phablet. Please excuse typos... and bad ideas.

    Aaron Maller
    Director
    Parallax Team, Inc.
    elton williams and amoursol like this.

  6. #6
    Forum Addict elton williams's Avatar
    Join Date
    December 7, 2010
    Location
    Gold Coast
    Posts
    2,602
    Current Local Time
    03:12 AM
    I just wish it was set to manual by default for new scripts bc i keep forgetting to switch it and after the first few nodes get connected....
    amoursol likes this.

  7. #7
    Senior Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    612
    Current Local Time
    06:12 PM
    I think I'm one of the only folk who actually likes automatic... that being said, I do turn off any heavy-duty scripts to Manual pretty swiftly

Similar Threads

  1. Replies: 4
    Last Post: August 2nd, 2017, 02:30 PM
  2. Replies: 0
    Last Post: April 5th, 2017, 08:45 AM
  3. Replies: 1
    Last Post: August 30th, 2016, 04:00 PM
  4. Replies: 8
    Last Post: March 21st, 2016, 11:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •