Here is a short video showing how to use fields to show sheet numbers in an mtext object.
A place to put reminders on how to do things or commands that I will use rarely, but are useful to know.
Ad
Friday, January 30, 2015
Saturday, January 24, 2015
Section Labels of Surface
Often times we need to label what type of line a section line is. In this case it is Ex. Grade and Prop. Grade.
Now the hard way to do this is to use a multileader and then move and adjust them with each design change. There is a an easier way that is a bit more dynamic. The way I do it is I create a corridor just for these two labels. For the assembly it’s a LinkWidthAndSlope for horizontally where you want the label to be placed and then a LinkSlopeToSurface to get from that point to the surface. It should look something like this.
The settings I use are shown here:
The values for the Existing surface are similar. Then all you need to do is to create a corridor, assign the code set showing the correct labels and then create polylines for the existing and proposed to control where the labels are placed so you can move them around on the section view to miss other labels. I usually end up with multiple code set styles to control how the labels are shown. Here is a drawing showing everything except for the polylines as targets and having multiple styles.
Thursday, January 08, 2015
Civil 3D 2015 Service Pack 2 API Bug
If you have a program that you wrote for Civil 3D and find a random crash in your routines, you may want to check to see if you are setting the ElevationMin for a profile view. If the ElevationMin property is set first Civil 3D will quickly crash without warning, even error catching can catch it. I’m guessing someone is trying to divide by zero causing the catastrophic crash. To get around this error set the ElevationMax first and then the ElevationMin. This seems to fix the issue. Alternatively you can set an elevation max and min values in the UI and it should start working correctly. This leads me to believe someone is dividing by zero in the property setting of the profile view.
Tuesday, January 06, 2015
Data Shortcuts Folder
Data shortcuts can be a big pain in the butt if things are change on you. Maybe someone started the project on the wrong hard drive and now you have to move it to the correct location. There is a way to help alleviate the issue and it is a little known variable named DSSYSVAR. This variable allows you to set the data shortcuts folder path with this windows environment variable. So if all of your data shortcuts are on the D:\Projects in one office and E:\OnGoing in another office you can use the DSSYSVAR to help not having to repath everything, all you need to do is change the DSSYSVAR to get it to work correctly.
The hard part is to create a user interface that will easily change the values. There is a Windows way to set the environmental variables. The first step is to create the variable. To do this first go into Windows Control Panel and type Environment Variables in the search box.
Then press the Edit the System Environment Variables option. Then go to the Advanced Tab, User Variables Button, Press the New Button for System Variables and then change enter in DSSYSVAR as the name and then the value you want it to point to.
If one is already created you will want to select the variable and then press Edit instead.
Now in Civil 3D you won’t see a change. If you look in the XML file of the data shortcut you will find that path is now saved using the DSSysVar.