Recent Posts

Pages: 1 ... 8 9 [10]
91
AutoLISP (Vanilla / Visual) / Re: Apply Plot style table to all layout
« Last post by 3dwannab on May 15, 2024, 03:53:09 PM »
Added checking if the plot style exists.

Code: [Select]
;;----------------------------------------------------------------------;;
;; setPlotStyle FUNCTION
;; https://www.theswamp.org/index.php?topic=45000.msg502065#msg502065
;; Added checking if the plot style exists by 3dwananb on 2024.05.15

(defun setPlotStyle (ctb / CurDoc installedPs)
  (setq CurDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
  (setq installedPs (vlax-safearray->list (vlax-variant-value (vla-GetPlotStyleTableNames (vla-get-ActiveLayout CurDoc))))) ;;get the plotstyles
  (if (/= nil (vl-position ctb installedPs))
    (progn
      (princ (strcat "\nPlot Style successfully set to: '" ctb "'\n"))
      (vlax-map-collection
        (vla-get-Layouts
          (vla-get-ActiveDocument (vlax-get-acad-object))
        )
        '(lambda (x) (vla-put-StyleSheet x ctb))
      )
    )
    (princ (strcat "\nPlot Style '" ctb "' not found!\n"))
  ) ;; if verify if the plotstyle exist, if not, print to the commandline.
)

(setPlotStyle "monochrome.ctb")
92
AutoLISP (Vanilla / Visual) / Re: ALternative to ade_odgettables in BricsCAD
« Last post by JasonB on May 15, 2024, 03:08:01 PM »
A similar query was raised here on the Bricsys forum
https://forum.bricsys.com/discussion/38119/gisimport

I don't see any options available using LISP in the developer help but i does look like there are options using .NET
https://developer.bricsys.com/bricscad/help/en_US/CurVer/DevRef/index.html
93
.NET / Re: PropertySetDefinition with a List data type
« Last post by Jeff_M on May 15, 2024, 02:43:18 PM »
Okay, more headway made. I finally realized that I needed a new class (PropList) to hold the list and the current value for the object. I have not yet been able to get the Combobox to display the list or current value. The DataTable is created properly, with the column for the List type created as a PropList type. Then in the Window the DataGrid's ItemsSource is set to the ViewModel's property for the DataTable. All the columns fill with the correct values, except that PropList column. One of the solutions I found in my searches says that adding this to the XAML should fix it:
Code - XML: [Select]
  1.                 <DataGrid.Resources>
  2.                     <DataTemplate x:Key="dataItemCellTemplate">
  3.                         <ComboBox SelectedValue="{Binding DataContext.CurrentValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  4.                                    ItemsSource="{Binding DataContext.Values}"/>
  5.                     </DataTemplate>
  6.                 </DataGrid.Resources>
  7.  

Where CurrentValue and Values are the 2 properties of PropList. Then include this in the code behind for the AutoGeneratingColumn event:
Code - C#: [Select]
  1.             if (e.PropertyType == typeof(PropList))
  2.             {
  3.                 var col = new DataGridTemplateColumn
  4.                 {
  5.                     CellTemplate = (DataTemplate)PropData.FindResource("dataItemCellTemplate"),
  6.                     CellEditingTemplate = (DataTemplate)PropData.FindResource("dataItemCellTemplate"),
  7.                     Header = e.PropertyName
  8.                 };
  9.                 e.Column = col;
  10.                 return;
  11.             }
  12.  
But something is still amiss and I am at a loss on where to look.
94
Do you need to use MS Graph? If not you could build your own simple web server on the company intranet or host it in the cloud. Something like Go with SQLite db would be easy enough to setup, you could even register it and then use it with the MS Graph api to get extra data if needed.
^^^ I believe this would be the same concept as hard-coding it into our acad.lsp file. It would still need updated by me, but I'd rather have it come from Graph since IT has to update these profiles already anyways  ;-)

Of course, the conspiracist in me immediately thought, scan employee emails and feed them to an AI to build profiles  :evil:
:laugh: That would be bonkers. Plus, that's what Copilot M365 is for yeah?  :whistling:
95
Anyone ?
96
AutoLISP (Vanilla / Visual) / Re: How to Access Microsoft Graph via Visual Lisp?
« Last post by MickD on May 15, 2024, 03:51:56 AM »
Do you need to use MS Graph?

With MS Graph you would have everything. From device info, who they have lunch schedules with, and Sally’s next fingernail appointment

No doubt!  :-D
97
Do you need to use MS Graph?

With MS Graph you would have everything. From device info, who they have lunch schedules with, and Sally’s next fingernail appointment
98
:shifty: I guess I hadn't thought of it like that  :lol:

Well, I watched a couple of videos and one of them mentioned, and I’m paraphrasing,
companies can access employee emails via the REST API to scan for keyword words as a search tool.

Of course, the conspiracist in me immediately thought, scan employee emails and feed them to an AI to build profiles  :evil:
 
99
AutoLISP (Vanilla / Visual) / Re: How to Access Microsoft Graph via Visual Lisp?
« Last post by MickD on May 14, 2024, 10:38:55 PM »
It seems to be able to access the api you need to register your 'app' then you can have at it.
https://learn.microsoft.com/en-us/graph/auth-register-app-v2

Do you need to use MS Graph? If not you could build your own simple web server on the company intranet or host it in the cloud. Something like Go with SQLite db would be easy enough to setup, you could even register it and then use it with the MS Graph api to get extra data if needed.
100
AutoLISP (Vanilla / Visual) / Re: How to Access Microsoft Graph via Visual Lisp?
« Last post by BIGAL on May 14, 2024, 08:08:07 PM »
I had plot routines that did as I suggested already, looked at user name and would send output to correct printer near them, we had a multi story building. Again (getenv "Username")

Yes if people leave have to change the list of names.

Note username is returned for current logged in user on a pc.
Pages: 1 ... 8 9 [10]