Property Set Formula VBScript For Manhole Invert Elevation Labels

Property Set Formula VBScript For Manhole Invert Elevation Labels

anthony5KYRC
Explorer Explorer
667 Views
5 Replies
Message 1 of 6

Property Set Formula VBScript For Manhole Invert Elevation Labels

anthony5KYRC
Explorer
Explorer

I don't have much experience with coding, but dove down the rabbit hole last night attempting to generate a custom property set to populate our manhole point labels with the measure down information for pipe inverts.

I got the label to generate how I want, but the problem I'm running into is that if there is no measure down input, I don't want the invert label to populate in the point label.

Here's what I've got. It seems to me like this would be an easy solution, but I cannot get the If...Then...Else... script to function how I want it to... It doesn't seem to be recognizing the If then else as a code statement at all, and just generating the result as text.

 

Invert Formula Property.jpg

 

[Invert1MeasureDown] is a manual property definition, where the distance will be added manually from the crew's field notes. I have the property set to a default "0" value, since I had originally thought that an empty data point was the cause for my troubles.

 

See below for the make up of the [InvertFormula1] contents, but I don't believe that is the issue here...

(As you can see, my Insert VBScript Code dialogue box is empty, which I understand is a common occurrence. I've been entering everything manually.)

Extra credit problem!
I have a formula property definition ([InvertFormula1]) simply to structure the text how I want:
I.E. = [Invert1] FT. ([Invert1Description]) Which becomes something like:

I.E. = 234.34 FT. (8" CONC , N/S)

 

[Invert1] is a formula property definition I created which determines the invert by subtracting the [Invert1MeasureDown] from the object elevation

 

[Invert1Description] is a manual property definition.

Is there an easy way to structure the RESULT= of the [Invert1] to spit out a format like above so I don't need the [InvertFormula1]?

0 Likes
Accepted solutions (1)
668 Views
5 Replies
Replies (5)
Message 2 of 6

RobertEVs
Advisor
Advisor

The Sincpac has this functionality. Can add data as a standard label or place the information in a Band style. Video showing it in action here

 

RobertEVs_0-1753386325465.png

 

 

0 Likes
Message 3 of 6

anthony5KYRC
Explorer
Explorer

Thanks @RobertEVs but we're a surveying company, and don't create any pipe networks in our CAD files. I'm trying to base this all off of a cogo point. My hope is to do this with as few additional steps as possible using bare Civil3D functionality.

 

We're a small company, and I want to be able to include the change in the new template update I push out at the beginning of every year. I don't think I'll be able to really able to get my field guys (who some times work as CAD techs) to set-up, install and use 3rd party functions, let alone get them to do pipe networks...

0 Likes
Message 4 of 6

RobertEVs
Advisor
Advisor

I see. Hope you get it to work

0 Likes
Message 5 of 6

essam-salah
Advisor
Advisor

@anthony5KYRC 

have you tried to apply the PropertySet on CogoPoint you developed and see the result?

0 Likes
Message 6 of 6

anthony5KYRC
Explorer
Explorer
Accepted solution

I can see the whole string of text show up in the cogo point, including all of the code.

I did manage to resolve this in a way. I believe the [InvertFormat1] set I had inserted into this function contained special characters (parenthesis, periods and quotation marks) which inadvertently interacted with the string of code in a way I didn't anticipate. When I replaced the [InvertFormat1] with "TEST" it populated correctly. 

I got around this by inserting two property sets into the label.

(I.E = [Invert1] FT. ) being one, with ([Invert1Description]) being the other. This way the invert description property set doesn't interfere with the first invert elevation set, and since it's manual entry anyways, I can set it so that it also doesn't show up in the label if no data is entered.

Someone more experienced with coding could probably string all of these together into a single property set, but for now I've got it working for my uses.

0 Likes