Jump to content

How to get number of layout tabs?


chulse

Recommended Posts

  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    12

  • SteveK

    11

  • chulse

    7

  • Fatrus

    3

Top Posters In This Topic

Does anyone know how to do this with Diesel? Please?

 

I'm not sure that you can - (layoutlist) itself is an Arx function, and the number is not stored in any Sys Var, so DIESEL is pretty difficult for this task.

 

I'd be intrigued if someone provided DIESEL code to accomplish such a task.

Link to comment
Share on other sites

I'm not sure that you can - (layoutlist) itself is an Arx function, and the number is not stored in any Sys Var, so DIESEL is pretty difficult for this task.

 

I'd be intrigued if someone provided DIESEL code to accomplish such a task.

 

Could if you were using 07. You could use lisp functions in fields. You can access 'lisp variables' now, why not just give us the option to use short lisp functions.

Link to comment
Share on other sites

Could if you were using 07. You could use lisp functions in fields. You can access 'lisp variables' now, why not just give us the option to use short lisp functions.

 

 

I can't believe they would remove that functionality. :x

(...well ok, yes I can...:glare:)

Link to comment
Share on other sites

Could if you were using 07. You could use lisp functions in fields. You can access 'lisp variables' now, why not just give us the option to use short lisp functions.

 

I'd like to know how to you use a lisp function within a field;

In the fields table I can only see LispVariable and I'm thinking if you assign a variable (eg (length (layoutlist))), you'd still have to initialize the lisp program at the start of each session... which a client wouldn't like.... but if there's somewhere where fields support lisp functions then we're in business! But is there...?

Link to comment
Share on other sites

I'd like to know how to you use a lisp function within a field;

In the fields table I can only see LispVariable and I'm thinking if you assign a variable (eg (length (layoutlist))), you'd still have to initialize the lisp program at the start of each session... which a client wouldn't like.... but if there's somewhere where fields support lisp functions then we're in business! But is there...?

 

Perhaps in the making....http://www.theswamp.org/index.php?topic=30471.0

Link to comment
Share on other sites

Perhaps in the making....http://www.theswamp.org/index.php?topic=30471.0

 

:) Yeah I think a fair few people are waiting to see Andrea's code... :geek:

 

Still, won't we need to run the lisp program to get the Mlisp to function? (fine for us, but not for clients) :(

Link to comment
Share on other sites

:) Yeah I think a fair few people are waiting to see Andrea's code... :geek:

 

Still, won't we need to run the lisp program to get the Mlisp to function? (fine for us, but not for clients) :(

 

Well, I only send PDFs to clients, so it will work wonders for me :D

Link to comment
Share on other sites

Well, I only send PDFs to clients, so it will work wonders for me :D

 

Hi Cary,

But then why not just assign a user variable to a field (eg userr1), then just before you pdf you update the variable with:

(setvar "userr1" (length(layoutlist)))

or any variable

(setq numLays (length(layoutlist)))

Link to comment
Share on other sites

Hi Cary,

But then why not just assign a user variable to a field (eg userr1), then just before you pdf you update the variable with:

(setq userr1 (length(layoutlist)))

 

Hmm

 

(if (not *CommandReactors-PlotSheetCount*)
 (setq *CommandReactors-PlotSheetCount*
        (vlr-command-reactor
          nil
          '((:vlr-commandWillStart . StrtCMD-PlotSheetCount)
           )
        ) ;_ vlr-command-reactor
 ) ;_ setq
) ;_ if
(defun StrtCMD-PlotSheetCount
      (calling-reactor StrtCMD-PlotSheetCountInfo / theCMDStrt)
 (setq theCMDStrt (strcase (car StrtCMD-PlotSheetCountInfo)))
 (cond
   ((wcmatch theCMDStrt "*PLOT*,*PUBLISH*")
    (setvar "userr1" (length (layoutlist)))
   )
 ) ;_ cond
) ;_ defun

Link to comment
Share on other sites

Hi,

Would this work for you:

 

(length (layoutlist))

Not sure about Diesel.

 

Nice an useful code there! Thanks for that.

Link to comment
Share on other sites

Hmm

 

(if (not *CommandReactors-PlotSheetCount*)
 (setq *CommandReactors-PlotSheetCount*
        (vlr-command-reactor
          nil
          '((:vlr-commandWillStart . StrtCMD-PlotSheetCount)
           )
        ) ;_ vlr-command-reactor
 ) ;_ setq
) ;_ if
(defun StrtCMD-PlotSheetCount
      (calling-reactor StrtCMD-PlotSheetCountInfo / theCMDStrt)
 (setq theCMDStrt (strcase (car StrtCMD-PlotSheetCountInfo)))
 (cond
   ((wcmatch theCMDStrt "*PLOT*,*PUBLISH*")
    (setvar "userr1" (length (layoutlist)))
   )
 ) ;_ cond
) ;_ defun

Yeah I like that Alan. Because then you can add other variables to it that might be referenced in other fields.

Plus, having it in your startup you don't need to worry about updating before pdf'ing.

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...