Jump to content

Make dimstyle current


Atwist

Recommended Posts

Hello forummembers,

 

How can I make a dimstyle current white a lisp:oops:.

 

   ((= op "18")
   (command "-layer" "S" "Text-18" "")
   (command ?????????????))
  ((= op "25")
   (command "-layer" "S" "Text-25" "")
   (command ???????????????))

 

Atwist

Link to comment
Share on other sites

Hello forummembers,

 

How can I make a dimstyle current white a lisp:oops:.

 

   ((= op "18")
   (command "-layer" "S" "Text-18" "")
   (command ?????????????))
  ((= op "25")
   (command "-layer" "S" "Text-25" "")
   (command ???????????????))

 

Atwist

 

"-dimstyle" "Restore" "Stylename here" or "select a dimstyle"

Link to comment
Share on other sites

Hello Tim,

 

I have make dis

 

   ((= op "18")
   (command "-layer" "S" "Text-18" "")
   (command "-dimstyle" "restore" "Text-18" "")
   (command "dtext" "" ""))
  ((= op "25")
   (command "-layer" "S" "Text-25" "")
   (command "-dimstyle" "restore" "Text-25" "")
   (command "dtext" ""))

 

But this dont work

 

Il becom this error

 

Command: dtext

Current text style: "Standard" Text height: 2.5000 Annotative: No

Specify start point of text or [Justify/Style]:

Point or option keyword required.

; error: Function cancelled

Link to comment
Share on other sites

Hello Tim,

 

I have make dis

 

   ((= op "18")
   (command "-layer" "S" "Text-18" "")
   (command "-dimstyle" "restore" "Text-18" "")
   (command "dtext" "" ""))
  ((= op "25")
   (command "-layer" "S" "Text-25" "")
   (command "-dimstyle" "restore" "Text-25" "")
   (command "dtext" ""))

 

But this dont work

 

Il becom this error

 

Command: dtext

Current text style: "Standard" Text height: 2.5000 Annotative: No

Specify start point of text or [Justify/Style]:

Point or option keyword required.

; error: Function cancelled

 

Are you trying to start the dtext function? If so then it would just be

 

(command "dtext") leave off the other ""

Link to comment
Share on other sites

Hello Tim,

 

Sorry for the late answer.

The last option don't works.

 

(start_dialog)

(cond

((= op "18")

(command "-layer" "S" "Tekst-18" "")

(command "-dimstyle" "restore" "ISO-18" "")

(command "dtext"))

((= op "25")

(command "-layer" "S" "Tekst-25" "")

(command "-dimstyle" "restore" "ISO-25")

(command "dtext"))

 

Il get this answer for AutoCad

 

Command: tlm
-layer
Current layer:  "Tekst-18"
Enter an option 
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]: S
Enter layer name to make current or <select object>: Tekst-18 Enter an option 
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]:
Command: -dimstyle
Current dimension style: ISO-18   Annotative: Yes
Enter a dimension style option
[ANnotative/Save/Restore/STatus/Variables/Apply/?] <Restore>: restore
Enter a dimension style name, [?] or <select dimension>: ISO-18
Current dimension style: ISO-18   Annotative: Yes
Command: TLM Unknown command "TLM".  Press F1 for help.
Command: dtext
Current text style:  "Standard"  Text height:  224.5752  Annotative:  No
Specify start point of text or [Justify/Style]: nil

 

 

Atwist

Link to comment
Share on other sites

Hi Lee

 

I'am sorry for the late answer.

 

Ware put I dis code in the lisp

(vla-put-activedimstyle <doc> <dimstyle object>)

 

(defun c:tlm( / dlg_id do_act loop key_pr)
(defun do_act(key_pr)
 (setq op key_pr)
 (if (= key_pr "cancel") (setq loop 0))
 (setq dlg_pt (done_dialog loop))
)
(setq id (load_dialog "tlm") loop 1)
(if (< id 0) (exit))
(if (not dlg_pt) (setq dlg_pt (list -1 -1)))
(while (/= loop 0)
 (if (not (new_dialog "tlm" id "" dlg_pt))
  (exit)
 )
 (action_tile "18" "(do_act $key)")
 (action_tile "25" "(do_act $key)")
 (action_tile "35" "(do_act $key)")
 (action_tile "50" "(do_act $key)")
 (action_tile "70" "(do_act $key)")
 (action_tile "100" "(do_act $key)")
 (action_tile "140" "(do_act $key)")
 (action_tile "200" "(do_act $key)")
 (action_tile "ont" "(do_act $key)")
 (action_tile "cancel" "(do_act $key)")
 
 (start_dialog)
 (cond
  ((= op "18")
   (command "-layer" "S" "Text-18" "")
   (command "-dimstyle" "restore" "ISO-18" "")
   (command "dtext"))
  ((= op "25")
   (command "-layer" "S" "Text-25" "")
   (command "-dimstyle" "restore" "ISO-25")
   (command "dtext"))

Link to comment
Share on other sites

 

(cond

((= op "18")

(command "-layer" "S" "Text-18" "")

(command "-dimstyle" "restore" "ISO-18" "")

(command "dtext"))

((= op "25")

(command "-layer" "S" "Text-25" "")

(command "-dimstyle" "restore" "ISO-25")

(command "dtext"))[/code]

 

Remove these

Link to comment
Share on other sites

I'am sorry for the late answer.

 

Ware put I dis code in the lisp

 

Don't worry about my suggestion for the minute, it uses Visual LISP methods which are a bit beyond the level of code you are currently using - continue with the route you are following, you're in safe hands :)

Link to comment
Share on other sites

Tim,

 

Thanks ist works:D

 

((= op "18")
   (command "-layer" "S" "Text-18" "")
   (command "-dimstyle" "restore" "ISO-18")
   (command "dtext" ""))

 

Il have "" remove on line dimstyle

And Il put "" behind dtext.

 

Many thanks from Germany

 

Also thanks to you Lee Mac.

 

Atwist

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