Ad

Saturday, February 18, 2012

Solr Installation, I Suck

I’ve tried installing stuff from the Apache Software Foundation before and haven’t had much luck. Today I’m determined to get Solr installed. If I succeed these are the steps I used.

First I downloaded and installed Java SE Development Kit from the Oracle website. I used the default location, but it looks like Apache would prefer you install it in the C:\jdk1.7.0_03 folder, but I installed it in the default folder.

Next I downloaded the ANT thingamajig and unzipped it and placed it in the C:\ANT folder. In order to get it to work we create the user variables in the control panel. The install documents also say you can run the set at the command line, but I’m not quite sure if that works. I did notice that I needed to type

set PATH=%PATH%;%ANT_HOME%\bin



at the command line in order to get ANT to work. If I close the command window I have to retype the string again. I’m sure there has to be a way to have this persist, but I couldn’t figure out how to do it.



image



Next open the Command Prompt. To do this go to the Start Menu and type run at the Search Programs and Files. Next type CMD to get the command prompt to open. Using cd.. go back a folder location, and then use the folder names to go the direction you want to go to.



SNAGHTMLdf7d966



You’ll want to end up in the folder location with the example code.



SNAGHTMLdf266e6



The folder contains the start.jar file. This is what is going to start the example. To start it type



java –jar start.jar



at the command line. This will start Solr using the example that comes with the Solr installation.



If you open a web browser and enter http://localhost:8983/solr/admin/ you can see that the installation is running. So yeah, I was able to figure it out and I have the steps to do it again, with some pictures.



image 



Next we need to load the data into the Solr that is running. To do this open a new command window and get to the example docs folder using the method above. Then type java –jar post.jar solr.xml monitor.xml to load the data into the Solr that is running into the other command window. This should load the data.



Still need to figure out how other things work, but at least I got it working.

Monday, February 06, 2012

XSL Reporting

When modifying the XSL Reporting you may want to make sure you are using the correct folder. The Report files are stored in this location, replacing the year with your product.

C:\ProgramData\Autodesk\C3D 2012\enu\Data\Reports\xsl

As long as you are running the reports from within Civil 3D you should be good to go. If you are using the LandXML reporting then you might end up with some problems. The Reporting tool typically utilizes the most recent version of Civil 3D (or maybe the last installed version, I don’t really know). So make sure the reports are utilizing the correct version you have modified. You can check by looking at the file location on the Forms Tab of the LandXML Reporting Tool:SNAGHTML7e8d1e8

I guess I should really start using the Last Modified By: field.

Saturday, February 04, 2012

Profile Blues

So I’m creating a profile in Civil 3D. Everything is going great. I’m able to open the program, set my profile and start working with Civil 3D. Then I get the big idea of setting my profile in the shortcut icon. This way whenever I start Civil 3D I’ll get my profile.

Suddenly I now have problems, big problems. The C that stands for Civil 3D in the upper left hand corner is now an A. Switching workspaces causes fatal errors. Sometimes the icons on the ribbon become question marks in clouds. The question marks may be living on cloud nine, but I’m far from it. What the heck did I do wrong?

It turns out the problem is how I created the profile. I created the profile from an AutoCAD based profile. Not quite sure how I got started with an AutoCAD based profile. It may have been because there is a profile in the default profile list in Options.

SNAGHTML35debb

The solution to recreate your profile using a Civil 3D profile. Maybe the <<C3D_Imperial>> or the <<C3D_Metric>> profile. This way you won’t have any issues like I have. If you do see the A in the corner you probably have this issue.

Tuesday, January 31, 2012

Rounding

You might not have noticed, or no one told you, but computers suck at math. Well more specifically they suck at rounding. I’ve been told JavaScript especially sucks at math, and one should avoid using it for Math. I guess that’s why Autodesk choose to use JavaScript to do the reporting within Civil 3D for the XSL type reports.

One such report is the Inverse_Report. You may notice that some of your bearings are slightly off. This is because of floating precision that computers use and the method Autodesk has chosen to round numbers. To fix this error we can use a common method to round the value to the correct number. To do this travel to the folder that holds the XSL reporting files:

C:\ProgramData\Autodesk\C3D 2012\enu\Data\Reports\xsl

Next open the General_Formating_JScript.xsl, if you are on my computer it will be on the top if you sort by Date modified (your results may vary). Once you open the file look for:

var anglePrec = 3;

If you want your bearings to be rounded to the nearest second change the value from 3 to 0. For any other rounding values, change it to the desired precision. Unsure why this wasn’t included in the Parcel settings within Civil 3D. This is just a diversion from the task at hand, otherwise known as padding.

Next scroll down until you reach this code snippet:

function formatAngleNumber(number)
{
var strFormatted;
strFormatted = number.toFixed(anglePrec);
return strFormatted;
}



Change the above code to the following:



function formatAngleNumber(number)
{
var strFormatted;
// strFormatted = number.toFixed(anglePrec);
strFormatted = Math.round(number * Math.pow(10, anglePrec)) / Math.pow(10, anglePrec);
return strFormatted;
}



The // comments out the original line of code. The next line makes the number large and then divides the resulting math by a large number to make it small again. By doing this we can hopefully eliminate the rounding issue.

Tuesday, January 24, 2012

Importing Excel Data

With all of the new features that come out, sometimes it’s hard to catch what you may have missed in the past. In this video I’ll cover how copy and paste data from Excel into AutoCAD to get a table that prints nicely. Other methods such as printing to PDF or using an OLE image can come out blurry and not print well on the plans. this method alleviates this problem and provides a way to show the data using an AutoCAD table.

That works great for single use, but what if you want a link between Excel and AutoCAD. Well That’s where Data Links come in handy. The video below goes through the steps.

Now that I can possibly make some revenue through videos on YouTube, you might see some more content presented in this fashion.

LinkWithin

Blog Widget by LinkWithin

Ad