Jump to content

Cui customising


DonovanPorter

Recommended Posts

Hi guys and gal's

 

i currently have a cui/lisp that we use to set a datum level and also to place a level after setting the datum level.

when placing the level it uses our level style.

 

the client has requested we use there style to indicate levels.

 

now this is where i am getting stuck i have created a copy of the current cui file and named it accordingly. i go in to the cui manager and i open the current cui file and i can see all the commands etc, now i want to to add there level indicator and remove ours. i cant find the indicator anywhere with in the cui manager. am i missing something??

 

i have read some so many tips and FAQ's iam not really sure whats going on any more ??

Link to comment
Share on other sites

  • Replies 28
  • Created
  • Last Reply

Top Posters In This Topic

  • DonovanPorter

    14

  • BlackBox

    10

  • Tyke

    5

Top Posters In This Topic

Posted Images

Don't really think so Renderman, I think its more to do with a reference level (height), something like a benchmark and they have a specific way of indicating in their drawing.

 

Perhaps the OP can clarify please.

Link to comment
Share on other sites

I'm *pretty sure* the OP is talking about implementing their client's 'layer style', but I could certainly be wrong.

 

In any event, we need clarification; let's see what the OP says... :popcorn: *anxious*

 

Edit:

 

"... Survey Says"

 

images?q=tbn:ANd9GcS8-lsY2C7E1XDbHIrcb-I22vK5QNNOhhRxZ-c9Y82oXJTUIzyRrg

Link to comment
Share on other sites

hi guys sorry for the delay yes its a hight indicator for example :top of concrete , water level , natural ground level , weir level , and so on

Link to comment
Share on other sites

@ RenderMan: :P You can't win em all ;)

 

@DonovanPorter: Have you loaded the cui as a Partial CUI and then edited that?

 

If you have that in a Civil 3D Style I would have created a copy of that style, renamed and then edited the style in C3D. As far as I know you can't edit styles in the CUI. Has the client you their level style and if so in what format?

Link to comment
Share on other sites

both our levels are in DWG format , when i open the CUI manger and open our CUI file (extras show in the image) on the place level tab i see there is a Macro wich seems to direct the command to the DWg, is that correct ??

 

pointy.jpg

Link to comment
Share on other sites

For those without a Microstation Translator... "level" = "layer" ;)

 

Don't really think so Renderman, I think its more to do with a reference level (height), something like a benchmark and they have a specific way of indicating in their drawing.

 

I'm *pretty sure* the OP is talking about implementing their client's 'layer style', but I could certainly be wrong.

 

yes its a hight indicator for example :top of concrete , water level , natural ground level , weir level , and so on

 

@ RenderMan: :P You can't win em all ;)

 

Shoot! :( *kicks dirt*

 

... At least we're headed in the right direction (now) though. :)

 

I can't read the wording of the macro, can you copy and paste into a post please.

 

*sings to self* Some-one for-got their glass-es, huh huh huh huh huh huuuh...

 

^C^C^P(load "DATUM")[b][color=darkorange])))[/color][/b] ^C^CPOINTY

 

Edit: What are the extra close parens for? :unsure:

 

SLW gets angry when you forget to use

[/url], and you wouldn't like him when he's angry.

... Looks like 'DATUM' is a custom [b][color=blue]*.LSP, *.FAS, *.VLX[/color][/b] file, and 'POINTY' is the custom command.

FWIW - I would re-write the macro so that 'DATUM' is only loaded if necessary, instead of each time the button is pressed:

[code]
^C^C^P(if (not c:POINTY)(load "DATUM"));POINTY;

... Can you post the source code found in 'DATUM'?

 

Not sure where to find 'DATUM'...?

 

Use this:

 

(findfile "datum.[color=red]<ext>[/color]")

... Where is one of the above (without the asterisk).

Link to comment
Share on other sites

iam not sure why there are so many parens ?? , this command was here long before i started working here and the person who created it , has since left.

 

my apologies with regards to the code tags , will remember that.

 

my knowledge of macros etc is really nil , so im not really sure what to do with the code you have given me to use to find the source code?

Link to comment
Share on other sites

No worries; I wasn't harping on you - forum humor that you'll pick up on once you *meet* SLW. LoL

 

In any event, copy this:

 

(findfile "datum.[color=red]<ext>[/color]")

... paste it at the command line, and hit Enter (be sure to replace as noted above). One of them will return a path, and the other two should return nil.

 

Edit: The returned path is where the source file is located. We're hoping that the source file is of the .LSP variety, as we cannot work with compiled code (.FAS, .VLX), easily if at all.

Link to comment
Share on other sites

Strange... forgive my nit-picking, but you specifically tried each of these:

 

(findfile "datum.lsp")

 

(findfile "datum.fas")

 

(findfile "datum.vlx")

 

...?

 

If those are no worky, perhaps you can tell me what is returned at the command line (if anything), with this:

 

(load "datum")

Link to comment
Share on other sites

when i open the .lsp i get this code

 

(vmon)
(DEFUN C:DATUM ()
(setq pt (getpoint "Select DATUM point : "))
(setq dY (cadr pt))
(setq lvl (getreal "\nDatum level : "))
(setq diff (- lvl dy))
(prin1)
)

(defun C:pointY ()
  (setvar "attdia" 0)
  (setq pt (getpoint "Select insertion point : "))
  (setq Y (cadr pt))
  (setq a (getvar "dimscale"))
  (setq y (+ diff y))
  (setq Y (rtos Y))
;
  (setq l (strlen Y))
  (setq s (- l 3))
  (setq Y1 (substr Y 1 s))
  (setq Y2 (substr Y (1+ s)))
  (setq YA (strcat Y1 "," Y2))
;
  (command "insert" "pointy" pt a "" "" YA)
  (setvar "attdia" 0)
  (prin1)
)

Link to comment
Share on other sites

Shoot! :( *kicks dirt*

 

... At least we're headed in the right direction (now) though. :)

 

Looks like RenderMan has everything under control here, so as I've nothing further to add (at the moment :whistle:) I'll let the 'little lad' finish off the job.

He likes to show off now and again :roll:.

Link to comment
Share on other sites

Looks like RenderMan has everything under control here, so as I've nothing further to add (at the moment :whistle:) I'll let the 'little lad' finish off the job.

 

Yeah well, don't stray too far... I get the LISP stuff (most of the time), but I still do not fully understand the OP's request. You got that right, my friend. :wink:

 

He likes to show off now and again :roll:.

 

*stutters* N, N, No I don't... *goes back to being awesome*

 

awesome.stormtrooper.75.jpg

 

:geek:

 

@ DonovanPorter -

 

Give this quick re-write a try:

 

(defun c:DATUM ()
 (princ "\rDATUM ")
 (_DATUM))

(defun _DATUM ( / pt lvl)
 (if (and (setq pt (getpoint "\nSpecify DATUM point: "))
          (setq lvl (getreal "\nEnter DATUM level: ")))
   (setq *datum* (- lvl (cadr pt)))
   (cond (pt (prompt "\n** DATUM level required ** "))
         ((prompt "\n** DATUM point required ** "))))
 (princ))

(defun c:POINTY  ( / pt s i)
 (princ "\rPOINTY ")
 (if (not *datum*)
   (_DATUM))
 (if (setq pt (getpoint "\nSpecify insertion point: "))
   (command "._-insert"
            "pointy"
            pt
            (getvar 'dimscale)
            1.
            1.
            (strcat
              (substr (setq s (rtos (+ *datum* (cadr pt))))
                      1
                      (setq i (- (strlen s) 3)))
              ","
              (substr s (1+ i))))
   (prompt "\n** Point not specified ** "))
 (princ))

Now, I'm not sure why there are two separate functions (DATUM, and POINTY), so what I've done is to incorporate a 'check' such that if the global variable *datum* (formerly diff) is NIL, you will be prompted to define the necessary criteria. Personally, I feel that all you need is one, complete POINTY function - but that is not for me to decide.

 

Please let me know if this works; if you'd like to understand more about the code I posted for you, let me know.

 

Also, I understand you didn't write it, but a couple of things about the code you posted:

 

The (vmon) "Virtual Memory On" function is no longer necessary (or documented for that matter).

 

Be sure to localize your variables in future code, in order to avoid potential conflicts with other routines.

 

Hope this helps!

Edited by BlackBox
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...