Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Parenthesis in string issue, please refresh me. Hello :D

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
bhull1985
826 Views, 8 Replies

Parenthesis in string issue, please refresh me. Hello :D

Issue:

 

   (setq Slides@ (list nil "AFC" "AS BUILT" "BID USE ONLY" "DESIGNCHECK" "IFC" "IFC LONGVIEW" "ISSUED CONTRC REVIEW" "ISSUED CUST REVIEW" "ISSUED DEMO ONLY" "ISSUED FOR APPROVAL" "ISSUED FOR BID" "ISSUED FOR CONSTRUCTION" "ISSUED FOR CUST APP" "ISSUED FOR FABRICATION" "ISSUED FOR INFO ONLY" "ISSUED FOR PROPOSAL" "ISSUED FOR QUOTE" "ISSUED FOR REF ONLY" "JOB STAMP" "JOB STAMP\(BUYOUT\)" "MAT ORDER ONLY" "MODIFIED STAMP" "PRE PRINT NOT FOR CONST" "PRELIMINARY" "Preliminary Stamp" "RELIEF STUDY" "REV DWG DESTROY PP")

 "JOB STAMP(BUYOUT)"

 

Parenthesis without correct control code in front of them are causing the slide to not appear. The "JOB STAMP(BUYOUT)" is referenced twice more within the code but I think showing me once how to handle it will suffice 🙂

 

 

Glad to see Kent, Pbe, Hmsilva, others, still perusing the forums here. LM 🙂

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
8 REPLIES 8
Message 2 of 9
Kent1Cooper
in reply to: bhull1985


@bhull1985 wrote:

Issue:

 

.... "JOB STAMP" "JOB STAMP\(BUYOUT\)" "MAT ORDER ONLY" ....

 "JOB STAMP(BUYOUT)"

 

Parenthesis without correct control code in front of them are causing the slide to not appear. The "JOB STAMP(BUYOUT)" is referenced twice more within the code but I think showing me once how to handle it will suffice 🙂

....


I believe that when inside quotes as part of a text string, parentheses don't require any control codes.  It worked for me in a quick test, making a list containing a text string with parentheses but no control codes, and using that item out of the list as the text content in a Text command in a (command) function.

Kent Cooper, AIA
Message 3 of 9
bhull1985
in reply to: Kent1Cooper

Interesting, that means more than likely that the issue is coming from either

  (set_tile "JOB STAMP\(BUYOUT\)" Slide20$)

or

((= a1 30)(MySub "JOB STAMP(BUYOUT)" 0.0 -0.0 insertpt1))

 

(defun MySub (a1 a2 a3 insertpt1 / OBJ P2 P3)						;subfunction
(vl-load-com)										;load vlisp functions
  (if (= objx 1)									;if flag is raised
    (progn										;do these actions
(setvar "osmode" 0)									;set osnap
(command "_insert" a1 insertpt1 "" "" pause)						;insert and select rotation
									
(if (> a2 0.0)										;if trim dist is greater than 0.0 preform
(progn
(setq obj (vlax-ename->vla-object name))
(if (eq (vla-get-ObjectName obj) "AcDbPolyline")					;; if it is a LwPolyline
     (setq p3 insertpt1
	   p2 (angle insertpt1  (vlax-curve-getpointatparam obj  (fix (vlax-curve-getparamatpoint obj insertpt1)))))		     
(setq p3 insertpt1
      p2 (angle (vlax-curve-getStartpoint obj) (vlax-curve-getEndPoint obj)))
)											;if
(command "break" name (polar p3 p2 a2) (polar p3 p2 a3))
)											;progn
(princ "\n......Selected....\n......Breaking Lines....")				;status
)											;if
)											;progn
(progn											;do these actions
  (command "_insert" a1 insertpt1 "" "" pause)						;insert				
  (princ)										;exit cleanly
)											;progn  
)											;if
(princ)											;print clear

)											;MySub
(princ)

 (for reference)

 

 

 Possibly the dcl?

		: img { key = "Slide20"; } : txt { label = "JOB STAMP(BUYOUT)"; } 

 

I know the parenthesis are fudging it somewhere. In two seperate dialogs every item's loading except the two that have parenthesis in their block names/coded references to the block names.

 

Thanks Kent!

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 4 of 9
doni49
in reply to: bhull1985

If there were an error with the parentheses so severe that it couldn't display the tile, I beleive it would throw an error and refuse to load the dialog at all. 

 

But it's been a while since I've done anything with DCL.

 

EDIT:  just to confirm or deny your theory, change the names/labels of those tiles so they don't have parentheses.  If it loads after you've done that, then you're on to something.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 5 of 9
bhull1985
in reply to: doni49

Thanks, but I know the code works for non-parenthesis items, because there are 29 more items that DONT have them that load. It's the slide images for the items with parenthesis that are not loading in the DCL dialog, which loads without (any other) issue.

Seems strange and perhaps tomorrow I'll either a) get clearance to rename the block/s, b)be deleting the block and therefor removing it from the code entirely, parenthesis and all, or c) still have to figure out correct control character and relevant portion of code to change.

Thanks again!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 6 of 9
doni49
in reply to: bhull1985


@bhull1985 wrote:

Thanks, but I know the code works for non-parenthesis items, because there are 29 more items that DONT have them that load.


Even given that, I'd still highly recommend it.  I don't know how many times I've been just as sure about something as you are now only to find out there was a little typo that I was overlooking.  After changing something even though I was sure "it can't be that",  my problem went away. 

 

In this case, you're sure that it has something to do with having the parentheses in the tile name but don't understand WHAT that is.  This test should take a very minimal amount of time and will either prove or disprove your theory.  If you remove the parentheses from the tile name, then that will confirm that it IS related to the parentheses.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 7 of 9
bhull1985
in reply to: doni49

Yes, I suppose I can remove the parenthesis from the SLIDE names and leave them in the block name still.

That'd allow me to test as you suggest. Will do and thanks!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 8 of 9
bhull1985
in reply to: doni49

Yes that indeed is the case, after removing the parenthesis from the 2 instances of slide variables and renaming the slide image itself to not have any parenthesis, it did show up in the DCL dialog.

I guess that's one easy way to solve this issue, thanks!

Though at this point I'm still wondering how I can solve it with control characters, but now it's not so important.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 9 of 9
doni49
in reply to: bhull1985

OK thanks for trying it. Now you've confirmed your theory.

That was the only reason I wanted you to try it.


Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost