Click here to Skip to main content
15,888,803 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reg. Regular Expression Pin
OriginalGriff11-Dec-14 0:21
mveOriginalGriff11-Dec-14 0:21 
SuggestionRe: Reg. Regular Expression Pin
Matt T Heffron11-Dec-14 8:34
professionalMatt T Heffron11-Dec-14 8:34 
SuggestionRe: Reg. Regular Expression Pin
Matt T Heffron11-Dec-14 15:33
professionalMatt T Heffron11-Dec-14 15:33 
SuggestionRe: Reg. Regular Expression Pin
Matt T Heffron11-Dec-14 8:35
professionalMatt T Heffron11-Dec-14 8:35 
AnswerRe: Reg. Regular Expression Pin
Agent__00710-Dec-14 21:07
professionalAgent__00710-Dec-14 21:07 
AnswerRe: Reg. Regular Expression Pin
Matt T Heffron12-Dec-14 7:04
professionalMatt T Heffron12-Dec-14 7:04 
GeneralRe: Reg. Regular Expression Pin
jschell12-Dec-14 12:08
jschell12-Dec-14 12:08 
QuestionRevit macro with if/else command Pin
William Wydock9-Dec-14 11:15
William Wydock9-Dec-14 11:15 
I am new to programming in general and i am working on a creating a macro for Revit 2015. I was able to create the following coding that builds a solution correctly without any errors in Sharpdevelop, but when i run the macro within Revit i get an error. Any help or incite would be greatly appreciated.

Thanks


public void Ranking()
		{
				Document doc = this.Document;
				
				FilteredElementCollector collector = new FilteredElementCollector(doc).OfClass(typeof(ViewSheet));
					
					using(Transaction trans = new Transaction(doc, "DrawinglistRank"))
					{
						trans.Start();
						int sheetRank = 1;
							foreach (Element Sheet in collector){
								
								Parameter paramDisc = Sheet.LookupParameter("SHEET DISCIPLINE");
								string sheetDiscipline = paramDisc.AsString();
								
								sheetRank+=1;
								
							
								if(sheetDiscipline == "GENERAL"){
							      sheetRank=1;
							     }else if(sheetDiscipline == "ARCHITECTURAL"){
							      sheetRank=2;
							     }else if(sheetDiscipline == "MECHANICAL"){
							       sheetRank=3;
							     }else if(sheetDiscipline == "ELECTRICAL"){
							       sheetRank=4;
							     }else if(sheetDiscipline == "PLUMBING"){
							        sheetRank=5;
							     }else if(sheetDiscipline == "FIREPROTECTION"){
									sheetRank=6;}
								
								Parameter paramRank = Sheet.LookupParameter("DISCIPLINE_RANK");
								paramRank.Set(sheetRank);
								

					trans.Commit(); 
				}
			
				TaskDialog.Show("Drawing List", "Drawing List Has Been Updated");
				}
		}

AnswerRe: Revit macro with if/else command Pin
BillWoodruff9-Dec-14 14:21
professionalBillWoodruff9-Dec-14 14:21 
AnswerRe: Revit macro with if/else command Pin
Eddy Vluggen10-Dec-14 0:32
professionalEddy Vluggen10-Dec-14 0:32 
Questionplease help me solve a nested dictionary structure problem!!! (here is a sample code where am i doing wrong) Pin
gajanangan9-Dec-14 7:22
gajanangan9-Dec-14 7:22 
SuggestionRe: please help me solve a nested dictionary structure problem!!! (here is a sample code where am i doing wrong) Pin
gaurigan9-Dec-14 16:17
gaurigan9-Dec-14 16:17 
QuestionRe: please help me solve a nested dictionary structure problem!!! (here is a sample code where am i doing wrong) Pin
Richard MacCutchan9-Dec-14 22:15
mveRichard MacCutchan9-Dec-14 22:15 
AnswerSolved :please help me solve a nested dictionary structure problem!!! (here is a sample code where am i doing wrong) Pin
gaurigan10-Dec-14 13:56
gaurigan10-Dec-14 13:56 
Questionproblem finding control and getting its values for dynamically created textboxes Pin
Dhyanga9-Dec-14 5:34
Dhyanga9-Dec-14 5:34 
SuggestionRe: problem finding control and getting its values for dynamically created textboxes Pin
Richard Deeming9-Dec-14 6:34
mveRichard Deeming9-Dec-14 6:34 
Questiontrouble to allocate/read buffer modified by native function Pin
Member 111038219-Dec-14 0:20
Member 111038219-Dec-14 0:20 
AnswerRe: trouble to allocate/read buffer modified by native function Pin
Richard MacCutchan9-Dec-14 6:08
mveRichard MacCutchan9-Dec-14 6:08 
QuestionTime out Expires while generating report. Pin
Pushpak Shah8-Dec-14 20:44
professionalPushpak Shah8-Dec-14 20:44 
QuestionRemote powershell / WinRM to Server 2012 Pin
JD868-Dec-14 18:49
JD868-Dec-14 18:49 
SuggestionRe: Remote powershell / WinRM to Server 2012 Pin
Richard MacCutchan8-Dec-14 22:07
mveRichard MacCutchan8-Dec-14 22:07 
GeneralRe: Remote powershell / WinRM to Server 2012 Pin
JD869-Dec-14 3:19
JD869-Dec-14 3:19 
GeneralRe: Remote powershell / WinRM to Server 2012 Pin
Richard MacCutchan9-Dec-14 5:49
mveRichard MacCutchan9-Dec-14 5:49 
GeneralRe: Remote powershell / WinRM to Server 2012 Pin
JD8610-Dec-14 5:09
JD8610-Dec-14 5:09 
QuestionCreate a nested TreeView for Windows 8.1 app Pin
Bhola S. Parit8-Dec-14 18:20
Bhola S. Parit8-Dec-14 18:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.