• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

dynamic hyperlink

  • Thread starter Thread starter ale&davide
  • Start date Start date

ale&davide

Guest
hello to all;
we are trying these days to create a lisp that I hope will solve our problems. we are fasting in lisp, it is the first time we apply on this, so we would like to have a suggestion from you.

what we try to get is: the possibility, following click on an object-lock, of opening a document located on the disk.
the sitema must request the document path and its extension, while the file name to be opened is recoverable from the block name. in each dwg there are "n" blocks.
once you set the intial parameters (path and file extension to open), autocad should then change only the file name according to the object-lock on which the operator clicked.
we believe it is necessary a concatenation of variables, the first is the path, the second the file name (represented by the block name) and the third is the extension.
Once you set the user variables, the system must then proceed "autonomously" without needing to relocate each time the 2 variables, until the user again needs to vary the 2 variables path and extension.


thanks to everyone for the attention
Hi.
alessandro and davide
 
command: hyped

select the block, the first time you have to insert the path and extension.
n.b.: if the file is c:\documents\labor\blocco1.txt, path=c:/documents/work, extension=txt.
if you need to change path or extension, reload the file lisp.

Good job
 

Attachments

written last night in a quarter of an hour.
I lost some time because I didn't remember the shell command. :biggrin:
lisp and basic are my daily bread as well as being a passion from beyond
20 years.

bye
 
command: hyped

select the block, the first time you have to insert the path and extension.
n.b.: if the file is c:\documents\labor\blocco1.txt, path=c:/documents/work, extension=txt.
Hi.
if I wanted to use the value of a block attribute as file name how should I change your script? !
Thank you.
roberto
 
command:
hyped (filename block)
hyped2 (file name selected attribute)
hyped3 (filename by block attribute by tag)

there was an error on hyped that did not allow the editing of the link from the second selection onwards. correct.

bye
 

Attachments

command:
hyped (filename block)
hyped2 (file name selected attribute)
hyped3 (filename by block attribute by tag)
Thank you so much is perfect! !
the only thing is that doesn't open the file (in my case an image).
the attribute is read correctly and created the string with the complete path. opens for a moment the shell window (I can't read that message from why it closes immediately) but doesn't open the file.
 
when performing hyped2 or 3 on command you find the name of the full path file, check that it is right.
example: os command: c:/bat/a.bmp

the file opens through the default program for the extension used, check that it is associated with something.

bye
 
the file opens through the default program for the extension used, check that it is associated with something.
bye
the path is correct but I realized that the file was in a disk with restrictions set by administrator. probably created problems because it was enough to move the file and it all works perfectly.
Thank you very much!!! Good to make! :-)
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top