Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/20/2020 in all areas

  1. On further investigation, the original font file is 08111901.shx. I think it unlikely that many computers would have this font installed, and so Alternate Font files would be used which possibly would not display the same effect. Do all the computers you are using have this font file installed?
    1 point
  2. Looking at your picture, my eyes see that the numerals and letters are different colours. Perhaps you should post the file of your exploded text from AutoCAD 2017. Also, perhaps, your system has a lisp over-riding your default Explode command.
    1 point
  3. If you open code in Vlide and check code the top line in "build" output will make a list of global variables you can copy and paste into the localise part of the defun saves a bit of time typing. Thanks to Lee-mac for that hint. an example of missing local variables. ; === Top statistic: ; Global variables: (A B K1 K2 L PT1 PT10 PT11 PT12 PT13 PT14 PT15 PT2 PT3 PT4 PT5 PT6 PT7 PT8 PT9 SZIGMA)
    1 point
  4. if you change your first line: (defun c:LP() to (defun c:LP( / a b szigma l pt1.....) this localises your variables - meaning that their values will not be saved and carried over to another LISP or next time it is run. If you want a variable to do that, its value saved for later, then don't put it after the '/' if that makes sense
    1 point
  5. Last time I had a program that worked 'sometimes' was because I had not localized my variables, and because some variable names were used in other programs, the initial values were incorrect. Steve
    1 point
  6. Short answer is yes. You can build a C# project which will either open AutoCAD or use an existing instance of it already open, then send a command to it which will load and run a LISP program of your choice. I do it all the time. I use the COM method, preferring to stay outside of the AutoCAD environment as much as possible. The LISP code I use also reads text files for input to create drawings. Oh, I should mention that I use VB.NET. If you search the Internet, you'll find numerous examples of how to do this. It will look something like this. You will need to add a reference to AutoCAD for this. Imports AutoCAD Module LaunchAutoCAD '************************************************************************************************************** ' LAUNCH AUTOCAD & LISP '************************************************************************************************************** Sub Launch_AutoCAD(ByVal DwgName As String) Dim vAcadApp As AcadApplication Dim vAcadDoc As AcadDocument Dim DwgPath As String = "\\My_Path_To\Engineering\Automated Drawings\" Dim LispPath As String = "//My_Path_To/LISPFiles/" Try If Process.GetProcessesByName("acad").Length > 0 Then vAcadApp = GetObject(, "AutoCAD.Application.19") Else vAcadApp = New AcadApplication End If vAcadApp.Visible = True vAcadApp.WindowState = AcWindowState.acMax vAcadDoc = vAcadApp.Documents.Open(DwgPath & DwgName, True) vAcadDoc.SendCommand("(load """ & LispPath & My_Lisp & ".lsp"" ""The load failed"") " & Cmd_To_Start_LISP_Program & Chr(13)) Catch ex As Exception Finally vAcadApp = Nothing vAcadDoc = Nothing End Try End Sub This code was shared with me about a year or so ago and it's configured for AutoCAD 13. It also leaves the instance of AutoCAD open as my project receives request from over the Internet 24/7. There may well be better methods but this works for my needs.
    1 point
  7. You can either extract the coordinates with vla-get-coordinates and combine the list into groups of 3 or entnext through the selected ename (using entsel), create a list of coordinates (X,Y,Z), sort by Z value, then you can easily take the highest and lowest value and label accordingly. eg. HighLowLabel.zip
    1 point
×
×
  • Create New...