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

Alignment StationOffset method

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
tcorey
475 Views, 2 Replies

Alignment StationOffset method

I am attempting to populate point description with station/offset from an alignment.

 

Alignments have a method called StationOffset(4), where you give it X, Y and it returns Station and Offset. Given alignment variable called algn, the following shoud work, no?

 

(vlax-invoke-method algn 'StationOffset ptx pty sta off)

 

ptx and pty are real numbers. Sta and off are the variables into which I want to place station and offset. If I don't create those variables ahead of time, I get:

 

; error: ActiveX Server returned an error: Parameter not optional

 

If I do create the sta and off variable ahead of time, I don't get the error, but the variables are not re-populated.

 

Any ideas?

 

 

 

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
2 REPLIES 2
Message 2 of 3
Jeff_M
in reply to: tcorey


@tcorey wrote:

 

 

Any ideas?

  


Yes, use the Sincpac-C3D tools for this, it's much simpler and you can link the points to an alignment so they will update as needed. Smiley Very Happy

 

However, to answer your question, when you pass a variable to a method which will fill said variable, precede it with a quote:

 

(vlax-invoke-method algn 'StationOffset ptx pty 'sta 'off)
Jeff_M, also a frequent Swamper
EESignature
Message 3 of 3
tcorey
in reply to: Jeff_M

That's the first thing I told him, that SincPac can do this, but his firm is under the thumb of a large international firm and they won't allow purchase of third party software, even if paying for a custom solution costs more. It's messed up, but that's the corporate world for you. 

 

Thanks for helpng, Jeff. 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut

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

Post to forums  

Rail Community


Autodesk Design & Make Report