Jump to content

Global values?


BUrBaKy

Recommended Posts

Hi all!

Here's my problem:

I have a open drawing in witch i'm currently working. From time to time during the work i need to insert a block with attributes. I'm inserting it with values chosen through a Form from an excel file.

 

The problem is that it's taking too long to open the excel file each time i want to insert a block. My macro opens the file, gets some values to my form (in comboboxes), i push a button and it insert's the block. Then the macro ends. Then i continue drawing and after that i need to insert again and the procedure repeats its self.

 

Instead I want to open the excel file just one time at the beginning of my work and load the information needed in some sort of global array or something that i can use multiple times during the session.

 

Is that possible?

Link to comment
Share on other sites

You need to open excel once and just save the variables, 2nd or 3rd etc time check if say a variable exists and not do the excell bit. make the excell part a defun within program easier to code then.

 

(if ( variable1 nil)

(princ "excell done")

(runexcell))

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...