Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FG Profile Parabola through VBA

1 REPLY 1
Reply
Message 1 of 2
Anonymous
173 Views, 1 Reply

FG Profile Parabola through VBA

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
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report