Ukryj spis treści

Task Properties - Script

When you create a new task that uses the SOLIDWORKS Task Add-in, or modify the Design Checker task, use the Scripts page of the task's Properties dialog box to modify the task add-in script, and select the SOLIDWORKS version and task type.

To display this page, do one of the following:

  • Right-click Tasks and click New Task.
  • Expand Tasks and double-click Design Checker.

On the Add-in page, for Add-in, select SOLIDWORKS Task Add-in. In the left pane, click Script.

Enter script to execute in SOLIDWORKS Script of plug-in that executes task.

To modify the script:

  • Type in the text box.
  • Place the pointer in the text box and click Insert Macro.
Insert Macro Inserts a macro at the cursor location in the script.

See Inserting Macros in SOLIDWORKS Task Add-in Scripts.

The following macros resolve to values in the user interface:

Macro Inserted in Script Resolves to Example
Source Folder Path <Path> Folder where the source file is located C:\MyVault\Drawings\
Vault Root Folder Path <VaultPath> Root folder of the vault C:\MyVault\
Task Instance GUID <TaskInstanceGuid> A globally unique identifier (GUID) that is used as the task ID.  
Source File Path <Filepath> Full path and file name of the source file. C:\MyVault\Drawings\ Part.sldprt

The following macros do not resolve to actual values. They remain as tokens in the script. You must add code that parses the values from the resolved value of other macros such as <Filepath>. Examples of how to do this are found in the default scripts for the Print and Convert tasks.

Macro Inserted in Script
Source File Name <Filename>
Source File Extension <Extension>
Configuration Name <Configuration>
SOLIDWORKS version to use SOLIDWORKS version used by task.

All tasks you create using the SOLIDWORKS Task Add-in must be run on a computer that has this version of SOLIDWORKS installed.

Task user interface type Determines configurable options for task.
You must save and then edit the task to see the configurable options, which are available as pages in the task's Properties dialog box.
Select one:
User Interface Type Configurable Options
General
  • Add-in
  • Execution Method
  • Menu Command
  • Script
  • Permissions
  • Success Notification
  • Error Notification
File Conversion General options plus:
  • Conversion Settings
  • File Card
  • Output File Details
Printing General Options plus:
  • Printer
  • Paper Size and Orientation
  • Margins
  • Files


Wyraź swoje opinie dotyczące tego tematu

SOLIDWORKS docenia wszelkie informacje i uwagi dostarczone przez użytkownika na temat prezentacji, dokładności oraz prawidłowości dokumentacji. Proszę użyć poniższego formularza, aby wysłać komentarze I sugestie na temat tego tematu do naszego zespołu dokumentacyjnego. Zespół dokumentacyjny nie może udzielać informacji na pytania natury technicznej. Proszę kliknąć tutaj, aby uzyskać informacje dotyczące pomocy technicznej.

* Wymagane

 
*Email:  
Temat:   Opinie dotyczące tematów pomocy
Strona:   Task Properties - Script
*Komentarz:  
*   Oświadczam, że zapoznałem/zapoznałam się z polityką prywatności, zgodnie z którą moje dane osobowe będą wykorzystywane przez firmę Dassault Systèmes, i niniejszym ją akceptuję

Wydrukuj temat

Wybierz zakres treści do druku:

x

Wykryliśmy że używasz przeglądarki w wersji starszej niż Internet Explorer 7. Dla zoptymalizowanego wyświetlania sugerujemy uaktualnienie przeglądarki do Internet Explorer 7 lub nowszej.

 Nie pokazuj tego komunikatu ponownie
x

Wersja zawartości pomocy w sieci Web: SOLIDWORKS PDM 2014 SP05

Aby wyłączyć pomoc w sieci Web w oprogramowaniu SOLIDWORKS i użyć zamiast tego pomocy lokalnej, należy kliknąć Pomoc > Użyj pomocy SOLIDWORKS w sieci Web.

Aby zgłosić problemy związane z interfejsem lub funkcją wyszukiwania pomocy w sieci Web, należy skontaktować się z lokalnym przedstawicielem pomocy technicznej. Aby wyrazić opinie dotyczące poszczególnych tematów pomocy, należy użyć łącza “Opinie dotyczące tego tematu” na stronie danego tematu.