Sheet Issue Date

Hi all–

I’m a Dynamo (and Python) newbie but I’ve been hacking together a sheet generator based on Konrad’s example from here: http://archi-lab.net/?p=497

I have it working except I can’t set the Sheet Issue Date parameter (at first I thought I was calling the wrong parameter, but it’s correct since I could extract it from the generated sheets), see the error here:

SetParameterByName

 

 

 

 

 

 

 

 

Getting the above error, I figured I’d try using the python script to set the Sheet Issue Date but received the following error (“expecting an integer but got date”):

SetDateViaPython

 

 

 

 

 

 

 

 

 

Any ideas what I’m doing wrong?

 

Any insight/help would be greatly appreciated. I feel it’s something simple that I’m missing and I don’t have a preference for either method just as long as it works.

thanks,

Russ

Can you post the first image again? It is not opening.

SetParameterByName

Seems like your parameter expects a double as input.the date is a string.

I just tried something and the non-python method works if I use a string to set the value of the “element.SetParameterByName” but then it’s not reading the value from the excel file…

Almost there, just need to remove the time…

String

it’s working now, but it seems a little clunky. Since I discovered that a string would work for the Element.SetByParameterByName value, I worked at converting the list of dates into a string, then formatted the subsequent list(s) to what I wanted (just the date, no time or AM/PM). The final list is taking only the dates and is controlled by the list count generated from the original date list…phew

any suggestions for making this a bit cleaner or insight into why all these steps were necessary would be greatly appreciated. I’m now wondering if the original formatting in the Excel file is partly to blame for all of these troubles (more experimenting to follow).

Clunky

Russell Higgins,

So, the original would have worked as well. Problem is that your input was a DateTime type (https://msdn.microsoft.com/en-us/library/03ybds8y) instead of what Revit wanted which was a String (Text). So if you were to just use one of the Dynamo’s Object.ToString nodes and then feed that string in, it would have been fine. Give that a try.