AutoCAD Civil 3D General

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

FG Profile Parabola through VBA

64 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 (64 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs