Original User: curtvpricePlease try to post code in code blocks in the forums. This is especially important with Python scripts, as indentation is part of the syntax!Here's how:Method 1: (This is the method to use in the forum's "WYSIWYG mode")1. Paste your code2. Select your code3. Click the "#" button in the interface([noparse]
[/noparse] "tags" will be inserted before and after the selection.)Method 2:(This method is more suited for old-school types who edit posts in "Source mode".)1. Enter: [NOPARSE]
[/NOPARSE]2. Paste your code in between [NOPARSE][/NOPARSE]
and [NOPARSE][/NOPARSE]Your post (in "source mode") should look something like this:[indent][NOPARSE][/NOPARSE] try:[INDENT]import arcpy[/INDENT] except: [INDENT]print "Houston, we've had a problem." raise[/INDENT] [NOPARSE]
[/NOPARSE][/indent]Now, click the Preview Post button at the bottom of the page to make sure you did it right. Your code should display in a code block widget:try: import arcpy except: print "We have a problem" raise
For more details on ArcGIS forum post formatting using BB codes (including some not included as buttons in the forum's "WYSYWYG mode") with examples, visit the BB Code List page. The ArcGIS forum supports most, but not all, of these BB codes.Thank you!