inventor:ilogic
Rozdíly
Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
Obě strany předchozí revizePředchozí verzeNásledující verze | Předchozí verze | ||
inventor:ilogic [2021/07/16 19:17] – [Polotovar] Zdeněk Havlík | inventor:ilogic [2025/01/09 13:27] (aktuální) – Zdeněk Havlík | ||
---|---|---|---|
Řádek 1: | Řádek 1: | ||
====== iLogic ====== | ====== iLogic ====== | ||
+ | ===== Form + save iproperties ===== | ||
+ | <file vbscript form_save_iprop.iLogicVb> | ||
+ | ' | ||
+ | Public Sub Main() | ||
+ | Dim oDrawDoc As DrawingDocument = ThisDoc.Document | ||
+ | Dim oName As String = " | ||
+ | |||
+ | '//////// | ||
+ | Dim oForm As New WinForm(iLogicVb.Automation, | ||
+ | oForm.ShowDialog() | ||
+ | |||
+ | iProperties.Value(oName, | ||
+ | |||
+ | oDrawDoc.Update | ||
+ | End Sub | ||
+ | |||
+ | Public Class WinForm | ||
+ | Inherits System.Windows.Forms.Form | ||
+ | Public Property oDrawDocint As DrawingDocument | ||
+ | Public Property oTextBox As New System.Windows.Forms.TextBox | ||
+ | |||
+ | '//////// | ||
+ | Public Sub New(ByVal Iinf As IiLogicAutomation, | ||
+ | oForm = Me | ||
+ | myIinf = Iinf | ||
+ | oDrawDocint = oDrawDoc | ||
+ | |||
+ | '//////// | ||
+ | With oForm | ||
+ | .FormBorderStyle = FormBorderStyle.FixedToolWindow | ||
+ | ' | ||
+ | .Width = 250 | ||
+ | .Height = 300 | ||
+ | .Font = oLargerFont | ||
+ | End With | ||
+ | |||
+ | '//////// | ||
+ | Dim oButton1 As New System.Windows.Forms.Button() | ||
+ | With oButton1 | ||
+ | .Text = " | ||
+ | .Top = ((oForm.Bottom - oForm.Top)/ | ||
+ | .Left = (oForm.Width/ | ||
+ | .Enabled = True | ||
+ | .AutoSize = True | ||
+ | End With | ||
+ | |||
+ | Dim oLbl As New System.Windows.Forms.Label | ||
+ | With oLbl | ||
+ | .Text = " | ||
+ | .Top = 20 | ||
+ | .Left = 20 | ||
+ | .Height = 40 | ||
+ | End With | ||
+ | |||
+ | With oTextBox | ||
+ | .Text = "Part No." | ||
+ | .Top = 20 | ||
+ | .Left = 120 | ||
+ | .Width = 100 | ||
+ | .Height = 25 | ||
+ | End With | ||
+ | |||
+ | oLbl = oForm.Controls.Add(oLbl) | ||
+ | oForm.Controls.Add(oTextBox) | ||
+ | oForm.Controls.Add(oButton1) | ||
+ | AddHandler oButton1.Click, | ||
+ | End Sub | ||
+ | | ||
+ | Public Property NewPartNumber As String | ||
+ | | ||
+ | Public Sub oButton1_Click(ByVal oSender As System.Object, | ||
+ | NewPartNumber = oTextBox.Text | ||
+ | Me.Close() | ||
+ | ' iProperties.Value(oName, | ||
+ | End Sub | ||
+ | End Class | ||
+ | </ | ||
+ | |||
===== Polotovar ===== | ===== Polotovar ===== | ||
- | < | + | |
- | <?php echo "hello world!"; ?> | + | < |
+ | 'From https:// | ||
+ | Try | ||
+ | ' | ||
+ | oValue = InputBox(" | ||
+ | ' | ||
+ | ' | ||
+ | iProperties.Value(ThisDrawing.ModelDocument.DisplayName," | ||
+ | Catch | ||
+ | |||
+ | End Try | ||
+ | </file> | ||
+ | |||
+ | <file vbscript zzz_Polotovar.iLogicVb> | ||
+ | If ThisApplication.ActiveDocument.DocumentType <> kDrawingDocumentObject Then | ||
+ | MessageBox.Show("Prosím, spustě toto pravidlo nad VÝKRESem", " | ||
+ | Exit Sub | ||
+ | End If | ||
+ | |||
+ | ' | ||
+ | |||
+ | Try | ||
+ | oValue = InputBox(" | ||
+ | iProperties.Value(ThisDrawing.ModelDocument.DisplayName, | ||
+ | ThisDoc.Document.Update | ||
+ | Catch | ||
+ | |||
+ | End Try | ||
+ | |||
+ | 'Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument | ||
+ | 'Dim oDrawParams As UserParameters = oDrawDoc.Parameters.UserParameters | ||
+ | |||
+ | 'Dim TestParam As UserParameter = oDrawParams.AddByValue(" | ||
+ | </file> | ||
+ | |||
+ | <file vbscript poznamky_nad_razitko.iLogicVb> | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | SetNotePath = " | ||
+ | |||
+ | ' This assumes a drawing document is active. | ||
+ | Dim oDrawDoc As DrawingDocument | ||
+ | | ||
+ | |||
+ | ' | ||
+ | Dim oActiveSheet As Sheet | ||
+ | | ||
+ | |||
+ | ' | ||
+ | Dim oGeneralNotes As GeneralNotes | ||
+ | | ||
+ | |||
+ | Dim oTG As TransientGeometry | ||
+ | oTG = ThisApplication.TransientGeometry | ||
+ | |||
+ | ' | ||
+ | oRead = System.IO.File.OpenText(SetNotePath) | ||
+ | EntireFile = oRead.ReadToEnd() | ||
+ | oRead.Close() | ||
+ | Dim sText As String | ||
+ | sText = EntireFile | ||
+ | ' | ||
+ | |||
+ | Dim oGeneralNote As GeneralNote | ||
+ | ' | ||
+ | ' | ||
+ | oGeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(50, | ||
+ | ' | ||
</ | </ | ||
+ | |||
+ | MessageBox.Show(" | ||
+ | Dim objSPVoice, | ||
+ | objSPVoice = CreateObject(" | ||
+ | objSPVoice.speak ("gate ley you fucked up again fill in that i property" | ||
+ | objSPVoice.speak ("i am facking awsome" | ||
+ |
inventor/ilogic.1626463044.txt.gz · Poslední úprava: 2021/07/16 19:17 autor: Zdeněk Havlík