AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

Reply
*R. Togores
Message 1 of 2 (68 Views)

FG Profile Parabola through VBA

68 Views, 1 Replies
05-25-2005 02:53 AM
Trying to add a FG profile to an alignments profiles collection, I succeed
if what I add are aeccProfileTangent PVIs
But receive an error message if I try to add aeccParabola PVIs.

The code I´m using reads:

Set oPerfil = oPerfiles.Add("TestProf", aeccFinishedGround, "Design Style",
0#, 999.585, "01-TEST")
Set oPerfPVIs = oPerfil.PVIs
Set objPVI = oPerfPVIs.Add(0#, 661#, aeccProfileTangent)
etc..

But when trying to call:
Set objPVI = oPerfPVIs.Add(40.000807, 661#, aeccParabola)
I get the following message error
Run Time error:
'-2147024809 (80070057)':
El parámetro no es correcto (which means "the parameter is not correct")
(Note: I am running Civil 3D on the spanish version of Windows XP)

The FG profile created with aeccProfileTangents can be edited afterwards,
manually adding the parabolas.

The Add method for AeccProfilePVIs is not adequately documented as there is
no explanation to what the two optional parameters Param1 and Param2 may be.
Maybe that could be the problem, albeit those parameters are supposed to be
optional:

Public Function Add( _
ByVal Station As Double, _
ByVal Elevation As Double, _
ByVal CurveType As AeccProfilePVICurveType, _
Optional ByVal Param1 As Variant, _
Optional ByVal Param2 As Variant _
) As AeccProfilePVI


Thanks in advance,
Reinaldo Togores
University of Cantabria, Spain
*R. Togores
Message 2 of 2 (68 Views)

Re: FG Profile Parabola through VBA

05-25-2005 07:36 AM in reply to: *R. Togores
Just in case it's useful to someone else, I'll answer myself... Just found
out how!

Parameter1 for a parabola should be the curve length.

Procedure should be to add first the two endpoints of the profile with
aeccTangent PVIs. Afterwards include the intermediate parabolas.

Best regards,

Reinaldo

"R. Togores" escribió en el mensaje
news:4855569@discussion.autodesk.com...
Trying to add a FG profile to an alignments profiles collection, I succeed
if what I add are aeccProfileTangent PVIs
But receive an error message if I try to add aeccParabola PVIs.

The code I´m using reads:

Set oPerfil = oPerfiles.Add("TestProf", aeccFinishedGround, "Design Style",
0#, 999.585, "01-TEST")
Set oPerfPVIs = oPerfil.PVIs
Set objPVI = oPerfPVIs.Add(0#, 661#, aeccProfileTangent)
etc..

But when trying to call:
Set objPVI = oPerfPVIs.Add(40.000807, 661#, aeccParabola)
I get the following message error
Run Time error:
'-2147024809 (80070057)':
El parámetro no es correcto (which means "the parameter is not correct")
(Note: I am running Civil 3D on the spanish version of Windows XP)

The FG profile created with aeccProfileTangents can be edited afterwards,
manually adding the parabolas.

The Add method for AeccProfilePVIs is not adequately documented as there is
no explanation to what the two optional parameters Param1 and Param2 may be.
Maybe that could be the problem, albeit those parameters are supposed to be
optional:

Public Function Add( _
ByVal Station As Double, _
ByVal Elevation As Double, _
ByVal CurveType As AeccProfilePVICurveType, _
Optional ByVal Param1 As Variant, _
Optional ByVal Param2 As Variant _
) As AeccProfilePVI


Thanks in advance,
Reinaldo Togores
University of Cantabria, Spain
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.