I'm not finding any way to add a profile to an alignment using .net api.
Is com the only way?
I can get at pvis via .net, so seems off they would leave out ability to add profiles.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
I have to say, you have me stumped.
I looked around ofr use of civilwrapper and found Isaac Rodriguez saying its only for internal use:
I see the VAlignment class, but is this some accidental documentation that we really should not rely upon for production apps?
any examples of its use?
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Well, that link should have taken you to the correct spot. Let's try this:
exactly, but see anything that lets you make a profile given a list of pvis or array of doubles for sta, elev...? You can only create via layout or surface.
Then add that profile to the profileIDs collection of the alignment? Notice the profile collection of an alignment is only exposed via a get function.
Maybe I am missing the obvious, but both things point towards com only.
thx
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Once you create the profile you add the ProfilePVI's to the ProfilePVICollection of the Profile you just created. It took me a bit to figure out the steps needed, and that code I have at home so this just going by what I'm seeing in that help and memory. But, it does work 🙂
ok, that makes sense.
I guess I thought CreatebyLayout did something different, but the params seem to indicate it just makes the basic profile object. Good enough, thanks a bunch.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
nice, the stupid examples are different between vb and C#. I never ever would have though to look under VB folder if not in C# one. its the wild west indeed.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
done, good reminder.
I started another thread on when and where to use a documentlock, that is another issue i am working through.
Seems like every tool that does something will be locking the doc.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
I'm far from being an expert, but I've found I only need to use the Document lock when 1.) I use a modeless dialog, 2.) I use a palette, 3.) I use the CommandFlags.Session parameter. There may be other times, but I'm not recalling anything at the moment.
yah, that modeless dialog one is big for me, since I have a few main dialogs that float.
Guess I just put a using doclock at the top of the button callback.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
how about adding an EG profile by list of PVIs?
Do we just forget EG profiles by user?
I guess Autodesk is deciding they can only be generated by a (C3D) surface....
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Well, you can't do that directly in C3D, either, so it's no surprise there's no API for it. Instead, you can mimic what one would do in C3D....create a 3dpoly from the known points, offset (I know you can't directly offset a 3dpoly, but we all have helper functions to do this, don't we?), create surface from the 3 3dpolys, create the profile from this surface, change it to Static, delete the surface and 3 3dpolys.
Note that I have not actually used this approach, but it's the first thing I'd test.
I guess when LDT gets retired, so does its definitions of what objects are.
Who needs EG profiles anyway.....
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Actually, what is an EG profile other than a type and a name? Oh, and VC's can't be added to EG types, anything else? So to create a profile by PVI, create a FG profile by the PVI's and assign it an EG style. I can't think of any reason why this wouldn't work.
I recall that in LDT, you could have tons of pvis in an EG prof, while an FG would choke at about 200 or something.
I don;t expect those limitations in C3D.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties