|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: 2000-11
Posts: 21
![]() |
Is there a way to create a .ink shortcut with lisp? I am copying network files to a hard drive, and would like to create a shortcut to the network directory programmatically, so it would be easy to save back to the network.
|
|
|
|
|
|
#2 |
|
100 Club
Join Date: 2000-12
Posts: 126
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thought I could find one in McNeels DosLib library but no luck. Maybe someone here knows the answer to that.
Otherwise, you can utilize the Shell scripting object. The following function creates a shortcut based on these arguments: target: path of file to make a shortcut to fname: filebase name of shortcut file (without extension) path: where to put the shortcut Code:
(defun myShortcut (target fname path / shellObj shortcut)
(cond ((setq shellObj (vlax-create-object "WScript.Shell"))
(setq shortcut (vlax-invoke-method
shellObj
'CreateShortcut
(strcat path "\\" fname ".lnk")
)
)
(vlax-put-property shortcut 'TargetPath target)
(vlax-invoke-method shortcut 'Save)
(vlax-release-object shortcut)
(vlax-release-object shellObj)
)
)
)
Last edited by stig.madsen : 2004-06-17 at 06:14 PM. |
|
|
|
|
|
#3 |
|
Member
Join Date: 2000-11
Posts: 21
![]() |
Awesome Stig!
Thanks for all your help. |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Project Shortcuts | Scott Davis | Revit Architecture - Tips & Tricks | 12 | 2004-03-10 11:37 PM |
| Options Bar: Shortcuts, Floating or Command line | Chad Smith | Revit Architecture "Original" Wish List (Archived) | 14 | 2003-11-06 12:35 AM |
| Creating Families | Revitlution | Revit Architecture - Families | 2 | 2003-10-10 11:59 PM |
| Simplified Line Keyboard Shortcuts | Scott Hopkins | Revit Architecture - Tips & Tricks | 0 | 2003-07-24 08:05 PM |
| Keyboard Shortcuts | gregcashen | Revit Architecture - Tips & Tricks | 14 | 2003-07-12 01:57 AM |