Ad

Tuesday, September 23, 2008

Create a Profile Without A Surface - 3DPolyline VBA III

Continuing on the previous posts in this topic, this time I'll add selecting a profile and then adding the 3DPolyline information onto the profile.

To select the profile copy the select alignment code and paste it below the select alignment code. Change the code to reflect the profile information.

image

No go down and edit the code that previously created the profile. Delete the lines crossed out below.

image Also delete the End If statement under the oProfile.Update line under Next as shown in the above screen capture. This will get the job done, but some error catching needs to be done. Like you'd want to make sure the alignment corresponds to the profile or give a prompt to see if the user wanted to keep the old PVI or replace an existing PVI elevation if it happened to be the same. Another good feature would be to check to make sure the 3DPolyline projects to the alignment.

Related Posts:
Create a Profile without a Surface - VBA
Create a Profile Without A Surface - 3DPolyline VBA
Create a Profile Without A Surface - 3DPolyline VBA II
Create a Profile Without A Surface - 3DPolyline VBA III

10 comments:

Anonymous said...

Hi,
i have been follow your post and i am abit confused now. Before VBAIII it seemed to work adding the 3DPoly to my profile, but at 0 elevation using the style provided in the VBA. Now It lets me select the profile only and still at 0 elevation noly now with no style display... is there a way to select the profile view and add back the style???

Christopher Fugitt said...

The code doesn't shouldn't affect the style. I'm not quite sure what you want to do. The routine should use the elevations of the 3DPolyline, so if it's resulting in 0 elevation, then the 3DPolyline probably has 0 elevation. To change the style in the previous post, just replace "Standard" with the name of the profile you want.

Anonymous said...

Okay, i think it worked closer to what i am looking for in the VBA II post. This post i thought it would allow me to select the profile view to show it in. I guess i need to revisit the code and make sure i have it all correct. As for the elevation resulting in 0 elevation, how do you recommend creating the 3dPoly.

Christopher Fugitt said...

What exactly are you trying to do? When you create a 3DPolyline it has elevation of 0 unless you select an oSnap that has elevation. If you want to add elevation to a vertex in a 3DPolyline I use the properties window and scroll through them or change the 3DPolyline to a feature line and use the elevation editor or quick edit.

Anonymous said...

Just trying to get the 3dpoly to have elevation in the profile. i reverted back to the code from VBA II post and everything worked except i still have 0 elevation. I did try your recommendations, although my result in the profile is still 0 for my 3dploy. not sure what i am doing wrong.

Anonymous said...

Okay i found the problem! spelling error...:)

It works great!

i only have two questions;
will the 3dpoly update when the elevations change on the 3dpoly?
can we program it to label automatically.

this is great THANK YOU!!

Christopher Fugitt said...

It is not dynamic, that would take a lot more code. Yes it is possible to have it label. Maybe a post for tomorrow.

Anonymous said...

Okay i will check back tomorrow!

Anonymous said...

I don't think you can add labels to a profile through the API. You can only turn them on or off.

oProfile.ShowLabels = True

Anonymous said...

yup, that's what it looks like.

thanks again it works well.

Hey, i am really looking forward to your Miter End Section for Pipe Networks.

LinkWithin

Blog Widget by LinkWithin

Ad