Lisp to Display profiles in dialog box

Lisp to Display profiles in dialog box

mmichel6UEHA
Advocate Advocate
1,093 Views
5 Replies
Message 1 of 6

Lisp to Display profiles in dialog box

mmichel6UEHA
Advocate
Advocate

Hello,

 

Is is possible to create a lisp that selects an alignment then displays the profiles associated with that alignment in a dialog box that they can be selected with? I would like the dcl file to be imbedded in the lsp if possible.

 

My overall goal is to automatically enter the station and profile elevation of a particular alignment's profile into a cogo point (station into the raw description and profile elevation into the elevation of the cogo point). I got that part down, its just changing it up a little bit to make the process more stream lined.

 

Right now my lisp selects the points, the alignment, it automatically zooms to the profile, then finally you select the profile. The lisp is divided into two lisp that inputs the station into the raw description. 

 

I kinda want this to be: select the points, the alignment then a dialog box appears where you could select a profile (water main for example). I see in general you might need some different coding that you need to call upon which I have no interest in doing. 

0 Likes
1,094 Views
5 Replies
Replies (5)
Message 2 of 6

Sea-Haven
Mentor
Mentor

Lots of us "have no interest in doing" be careful what you wish for.

0 Likes
Message 3 of 6

hosneyalaa
Advisor
Advisor

@mmichel6UEHA 

try


(defun c:testALIGNMENT (/)
  (vl-load-com)
  (if (setq ss (ssget ":S" '((0 . "AECC_ALIGNMENT"))))
    (progn


      (vlax-for profil (vlax-get (vlax-ename->vla-object (ssname ss 0))
                                 'profiles
                       ) ;_ end of vlax-get


        (alert (vlax-get profil 'name))




      ) ;_ end of vlax-for


    ) ;_ end of progn
  ) ;_ end of if
) ;_ end of defun
;|«Visual LISP© Format Options»
(72 2 50 2 T "end of " 60 9 1 0 0 nil T nil T)
;*** DO NOT add text below the comment! ***|;

 

 

2.gif

0 Likes
Message 4 of 6

mmichel6UEHA
Advocate
Advocate

I am only wondering if my mind exceeds the capabilities of lisp coding, which has happened in the past. I will continue trying to help my coworkers become more productive. I am not asking you to write the entire lisp and do it for me, I am wondering if it is possible to write the specific part of the code I have questions about. If its not possible I would like someone who has more experience and knows a lot more about lisp coding to give me advice. If its possible to give me specific commands to help me out that would be great!

 

I am wondering if the dialog box could be selectable. Click on an alignment and display a list of profiles that you could select and input data into a cogo point. Right now the profiles are selected manually, so if you have two back of curb offset profiles, two sidewalk offset profiles and a centerline, its difficult to pick one from the other without hiding the profile views in the profile view properties. Thank you for your response hosneyalaa.

 

0 Likes
Message 5 of 6

hosneyalaa
Advisor
Advisor

Sorry my English is not good

So Add a drawing for the example With a video explaining what is required It is possible to work with profile names at dialog box  But I didn't understand  this 

input data into a cogo point

0 Likes
Message 6 of 6

mmichel6UEHA
Advocate
Advocate

Not a problem, I will do that Monday. Thanks!!

0 Likes