Shouldn't it be as simple as:
(vlax-invoke-method profileobj 'add station elevation 0)
0 being tangent... if that's correct
not sure why this won't work.
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
It won't work because there is no Add method for Profiles.
It also won't work if the Profile is Dynamic, so check this property before going too far.
A Profile object has a PVIS property.
The AeccProfilePVIs objects has an Add method, and also has an AddMultiple method.
From the C3D2010 help:
Adds a PVI to the collection and optionally places a vertical curve at that PVI.
HRESULT Add( [in] double Station, [in] double Elevation, [in] AeccProfilePVICurveType CurveType, [in, optional] VARIANT Param1, [in, optional] VARIANT Param2, [out, retval] IAeccProfilePVI** pPVI );
Parameters
|
Description
|
Station
|
Station value for the new PVI.
|
Elevation
|
Elevation value for the new PVI.
|
CurveType
|
Type of curve to place at the new PVI.
|
Param1
|
See the remarks section.
|
Param2
|
See the remarks section.
|
pPVI
|
Returns the new PVI.
|
For a line, Param1 and Param2 are unused. For a circular arc, Param1 is the radius. Param2 is unused. For a symmetric parabola, Param1 is the curve length. Param2 is unused. For an asymmetric parabola, Param1 and Param2 are the two tangent lengths used to define the entity.
Roger that... sorry typed that in on a wim....
that was supposed to be the PVIS object...
must just be my station elevation tangent formatting...
This may work...no time to test though.
(vlax-invoke-method profilepvis 'add station elevation 1 nil nil)
The 1 is the Enum equal for AeccProfilePVICurveType.aeccProfileTangent and the 2 nil's are for the optional values that aren't used with the Tangent type but still must have a placeholder for them.
Always appreciate the words of wisdom, it worked, of course...it came from you.
How do I identify the enum for the tangent like you posted?
I used C3D2010, started a new VBA project, added the AeccLand references, then used the immediate window like so:
? AeccProfilePVICurveType.aeccProfileTangent
and it returned 1. Using this with the .aeccProfileArc returns 2.
I used 2010 because I don't need/want to use the VBA add-in for 2011-2012.
There is a way to do this in VLisp, and I used to do it with the LDT libraries, but this seems to be one of those things I have completely forgotten how to do. I even searched through some of my old lisps for the code but was unsuccessful. This then would allow the activeX enums to be not only evaluated, but actually used in your lisp code.
Can't find what you're looking for? Ask the community or share your knowledge.