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: 

Rotate multiple points along alignment

24 REPLIES 24
SOLVED
Reply
Message 1 of 25
hakangus
3505 Views, 24 Replies

Rotate multiple points along alignment

Some years ago there was a VB script called Rotate Points.dvb that rotated multiple Civil Points along an alignment. Anyone have a similar command working for Civil R2013?

24 REPLIES 24
Message 2 of 25
AlmasSuljevic
in reply to: hakangus

Hi hakangus,

 

I am not aware of that script, but you may be able to rotate points with similar procedure to rotate points independently of point label, as described in the blog post Seth Hall wrote. Here is the link: http://beingcivil.typepad.com/my_weblog/2010/01/rotate-point-marker-independently-of-the-point-label...



Almas Suljevic
Product Support Specialist
Autodesk Global Subscription and Support
Autodesk, Inc.

Please click on "Accept as Solution" if post helped you resolve the issue.
Message 3 of 25
hakangus
in reply to: hakangus

Thank you for taking your time.

 

I´m afraid that it didn´t help me.

 

On my Alignment I put Points with the command Point/Measure Alignment and took the elevations from my profile.

All points were labeled with a +-sign and elevation and were rotated 0 degrees.

 

What the script made for me in those days was the following:

 

I selected the Point Group, choose the Alignment and the script rotated the points perpendicular to the Alignment for every point.

 

It saved a lot of time instead of rotating each point individually.

It was meantioned in an older forum thread but I can´t find the actual script anymore. (Rotate point.dvb)

Message 4 of 25
mathewkol
in reply to: hakangus

I wrote that app. It has not been updated to 2013 or 2014 unless some else has done it.
Matt Kolberg
SolidCAD Professional Services
http://www.solidcad.ca /
Message 5 of 25
Jeff_M
in reply to: mathewkol

Matt, would you mind sharing the code for that? I could out it into a lisp or .NET dll and post back here.

 

Oops! Looks like I found the dvb in my archives. Stay tuned!

Jeff_M, also a frequent Swamper
EESignature
Message 6 of 25
hakangus
in reply to: mathewkol


@mathewkol wrote:
I wrote that app. It has not been updated to 2013 or 2014 unless some else has done it.

Cudos x 1000!

 

Nice to "meet" you Matt, the maker of a wonderful script!

It´s superb news if you, Jeff, would be so nice to rewrite it for me/us!

 

You guys made my day!

Message 7 of 25
Jeff_M
in reply to: hakangus

Attached is a new lisp for this. Command name is "ptsalign". Not sure if it functions exactly like the DVB, although it should as I used the same parameters for the rotation. I did add the LabelRotation to match the Point Rotation...this property didn't exist when the DVB was written...not sure if this is desired behavior.

 

Removed this lisp. Updating to match Matt's 2012 version.

Jeff_M, also a frequent Swamper
EESignature
Message 8 of 25
mathewkol
in reply to: Jeff_M

Here is the code.  It was last updated to work with 2012.  Rename and remove the txt, change to dvb.  My code rotates blocks as well.

Matt Kolberg
SolidCAD Professional Services
http://www.solidcad.ca /
Message 9 of 25
Jeff_M
in reply to: mathewkol

Thanks Matt!
Jeff_M, also a frequent Swamper
EESignature
Message 10 of 25
Jeff_M
in reply to: hakangus

New lisp setup to function as Matt's VBA macro does. Note that this should work in all versions of C3D, 2012 and newer.

Jeff_M, also a frequent Swamper
EESignature
Message 11 of 25
hakangus
in reply to: Jeff_M

I quickly tried your LISP Jeff. I´m sorry to say I didn´t got it to work. I´m not sure if I did it right but after I had selected my points and my alignment and choosen one of three alternatives after that, the LISP have me "bad argument" and nothing happened. What does the clockwise, counterclockwise mean? I must have done something wrong.
Message 12 of 25
Jeff_M
in reply to: hakangus

Well, shoot, it's working in all cases I've tested. I did find a few types and misplaced variables (oops) but none that should've affected how it edits the points. Attched is a new version with those items corrected. The Clockwise, cOunterclockwise or No rotation is just how the points are oriented to the alignment. No means no roation will be applied so they will come in parallel to the alignment. Clockwise means they rotate 90 degrees right, cOunterclockwise means 90 degrees left. Input the Capitalized letter for the shortcut rather than typing the whole thing. (N, C, or O).

 

If this still errors, is there anything else in the command history that may point to the source of the error? Are any of the points or layers locked?

Jeff_M, also a frequent Swamper
EESignature
Message 13 of 25
hakangus
in reply to: Jeff_M

I quickly tried your LISP Jeff. I´m sorry to say I didn´t got it to work. I´m not sure if I did it right but after I had selected my points and my alignment and choosen one of three alternatives after that, the LISP have me "bad argument" and nothing happened. What does the clockwise, counterclockwise mean? I must have done something wrong.
Message 14 of 25
hakangus
in reply to: hakangus

Ok, I will try it again tomorrow. I´m not at my CAD machine right now. I must be doing something wrong. I let you know. Sorry about the double post...
Message 15 of 25
hakangus
in reply to: hakangus

This is what I see in my CAD text window:

 

Command:
PTSALIGN
Select points:
Select objects: 1 found

Select objects: 1 found, 2 total

Select objects:

Select alignment:
Select objects:

Maximum offset from alignment: 1

...rotate Clockwise, cOunterclockwise, No extra rotation [No]...: n
; error: bad function: 3.14159

Command:

Message 16 of 25
Jeff_M
in reply to: hakangus

Ok, my test drawing never allowed one of the conditional branches to be hit, and it happened to have 2 parenthesis  that shouldn't have been there. This version should work for you.

Jeff_M, also a frequent Swamper
EESignature
Message 17 of 25
hakangus
in reply to: Jeff_M

Back at work and TaDa (Trumpets and Drums)!

It´s working! I´m so happy!

 

A big Thank You to you guys for helping me out here!

Message 18 of 25
hakangus
in reply to: hakangus

I added the alternative Flip for those cases the Alignment is drawn "in the wrong" direction.
Message 19 of 25
strsi681
in reply to: hakangus

Thanks guys - been looking for this

Message 20 of 25
mshipes08
in reply to: strsi681

I know this is a really old post, but hoping someone can help. i loaded the lisp and it works great, but.... I have an alignment running west to east. All of the points south of my alignment rotated great, but every point north of the alignment was upside down. i know next to nothing about LISP files, so dont know if there's something I can change to make none of my points flip upside down. Or if I'm even running this command correctly. Im running C3D 2015, so there may even be an updated command that I am not aware of???

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

Post to forums  

Rail Community


Autodesk Design & Make Report