rename Civil 3D profiles

rename Civil 3D profiles

Dexterel
Collaborator Collaborator
1,168 Views
2 Replies
Message 1 of 3

rename Civil 3D profiles

Dexterel
Collaborator
Collaborator

Hello,

 

I need a lisp or a solution to rename all my profiles (Civil 3D 2016 profiles) automatically to match the alignment name.

Note that I have only one profile for each alignment and some alignments don't have any profiles.

 

Many thanks in advance.

0 Likes
Accepted solutions (1)
1,169 Views
2 Replies
Replies (2)
Message 2 of 3

Ranjit_Singh
Advisor
Advisor
Accepted solution

Try below. This should update all the profile names (not the profile view names)

(defun c:somefunc ( / vlaObj)
(mapcar '(lambda (x)
(vla-put-name (setq vlaObj (vlax-ename->vla-object x)) (vla-get-name (vla-get-alignment vlaObj))))
(mapcar 'cadr (ssnamex (ssget "_x" '((0 . "AECC_PROFILE"))))))
(princ))
Message 3 of 3

Dexterel
Collaborator
Collaborator
Thank you very much.
Its exactly what I needed and works instantly.
0 Likes