Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sheet Number Already Exists - error in modified code #149

Closed
thazell opened this issue Jan 26, 2017 · 11 comments
Closed

Sheet Number Already Exists - error in modified code #149

thazell opened this issue Jan 26, 2017 · 11 comments

Comments

@thazell
Copy link
Contributor

thazell commented Jan 26, 2017

I tried to modify your Sheet Shifting code to handle two non numeric leading characters and eventually wanted to include a modification for a potential trailing character. That's all good, but how did you get around the "Number is already in use" error in Revit?

Shift Sheets.txt

In addition, my modification: looks like the sheet number has been updated on the project browser, but is leaving the sheet number... odd. (might be related)

image

@thazell thazell changed the title Sheen Number Already Exists Sheet Number Already Exists - error in modified code Jan 26, 2017
@eirannejad
Copy link
Collaborator

I'm really not error checking in my script. So you should get an error if you're shifting down let's say A102 and there already is a A101; you'll get an error.

As far as the sheet update goes, I have seen that happening before with Title block information and Especially schedules on a sheet not reflecting the actual schedule. Usually this gets fixed by closing and reopening the view to push Revit to re-render the view.

@thazell
Copy link
Contributor Author

thazell commented Jan 26, 2017

But somehow, if you grab 100 and 101 your code can shift them both up so you get 102 and 101. It appears that's not working in my case. Any thoughts on what's different?
and thanks for your feedback.

@eirannejad
Copy link
Collaborator

Oh It shifts them up in order! So it first shifts 101 to 102 and then 100 to 101

@thazell
Copy link
Contributor Author

thazell commented Jan 26, 2017

However it's all happening in one transaction , right? Isn't this the same?

Shift Sheets.txt

@eirannejad
Copy link
Collaborator

Okay. I'll look into this now. Tell me exactly what it needs to achieve?

@thazell
Copy link
Contributor Author

thazell commented Jan 26, 2017

Your code as is does great if the sheets are. I was trying to make it work for sheets with the following conventions:
S100
S-100
S0100
SD-100
SD100
S100A
S101B
SD202B

@eirannejad
Copy link
Collaborator

@thazell
I updated the increment/decrement tools to accept any sheet number type. It works on all the sheet numbers you provided here. See latest commits

848cf50

@thazell
Copy link
Contributor Author

thazell commented Feb 1, 2017

@eirannejad Thanks! It works well for a variety of sheet numbers. The sorting doesn't seem to always work. Note it tried the 001 before 002, but it sorted the rest of them. (see image below)
image

@eirannejad
Copy link
Collaborator

Fair. The sorting is super simple right now. Let me look into the sorting function

@eirannejad
Copy link
Collaborator

Fixed sorting by sheet number. Update and let me know

@thazell
Copy link
Contributor Author

thazell commented Feb 1, 2017

That seems to have worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants