See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Text output based on cgeocs variable

  1. #1
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    306
    Login to Give a bone
    0

    Default Text output based on cgeocs variable

    I created a dieselexpression that pulled the cgeocs variable and returned text based on the value.

    I used
    Code:
    $(if,$(eq,$(getvar,cgeocs),CGEOCSVALUE),"TEXT TO DISPLAY")
    Then I duplicated this for every coordinate system we could ever realistically use, but I ran into a text limit problem of 255. My biggest issue is I have a good 19 systems that we could theoretically use due us surveying in multiple states (but largely due to us using the Iowa Regional Coordinate System which has 14 zones).

    I ended up creating a dynamic block with visibility states which sort of accomplishes what I wanted, but I was hoping to use the expression to automate updating the layout tab by having the drafter set the coordinate system and the tab updating the information without having to worry about it.

    Does anyone have any ideas on how to accomplish it from an automation standpoint?

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    So are you trying to name the layout tab with the data returned by CGEOCS ?
    R.K. McSwain | CAD Panacea |

  3. #3
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    Can you use abbreviations in the "TEXT TO DISPLAY" value to stay within the 255 character limit? I'm assuming that is where the problem lies. Also, are you doing this as a field within text objects or changing the layout tab name?
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  4. #4
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    306
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    Quote Originally Posted by rkmcswain View Post
    So are you trying to name the layout tab with the data returned by CGEOCS ?
    This answers part of Opie's post below, but no, it's a field that ran the dieselexpression and displayed the text based on the cgeocs variable.

    Quote Originally Posted by Opie View Post
    Can you use abbreviations in the "TEXT TO DISPLAY" value to stay within the 255 character limit? I'm assuming that is where the problem lies. Also, are you doing this as a field within text objects or changing the layout tab name?
    I was hoping to have it spelled out clearly since it's going on our Overall Existing Site Information page that shows the overall site boundary, control, benchmarks, One Call Information, legend, and horizontal/vertical coordinate system which is why I wanted it spelled out quite clearly and not abbreviated. It's not under the hood information a drafter will see, but information that will be displayed on a PDF that we deliver to a client.

    The answer on the character limit is not to my knowledge. I have 19 coordinate systems to factor in for so the above code that I came up with was literally repeated 19 times with different cgeocs variables and different text. No matter how simple you try to make that code the math doesn't check out. Each line would have to be 13 or less, and that line of code is 30 at least.

  5. #5
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    Since you are posting in the AutoLISP forum, it appears yoo are looking for an AutoLISP solution. AutoLISP can read this system variable. It can also make changes to text objects or dynamic blocks or even create a global variable, which your field could read.

    How would you like to proceed?
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #6
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    306
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    Quote Originally Posted by Opie View Post
    Since you are posting in the AutoLISP forum, it appears yoo are looking for an AutoLISP solution. AutoLISP can read this system variable. It can also make changes to text objects or dynamic blocks or even create a global variable, which your field could read.

    How would you like to proceed?
    Yeah sorry, I wasn't 100% sure where I wanted to post this, but since I started with a diesel I figured LISP might be the appropriate forum to post in. I was sort of looking for whatever feedback I may get on how to approach this, whether it was with a block or code or whatever. I can post in another forum if necessary (if coding can't do it the way I want).

    The simplest answer is I am looking for an automated process to put whatever text I want on the cover sheet of our existing site information documents and the text to display is based on what the cgeocs variable is. I don't really care if it's a block or a field or anything just so long as if I set the cgeocs value to IA83-SF the text says Iowa State Planes-South Zone, and then if I switch it to IRCS-ZONE_08 it would say Iowa Regional Coordinate System-Zone 8. I would like this feature to be able to be embedded in the template so all a user has to do is set the drawing coordinate system and it updates appropriately. I'm semi-competent at LISP scripting (I've made a few command strings to automate some processes), but I'm not sure how you'd get the LISP into the template file in this manner.

    I found the LISP variable section in fields, do we need to create a field that references a custom made LISP variable that basically does what my dieselexpression was trying to do? Will that work for users who don't have that LISP routine on their computer?

    Thanks for the help

  7. #7
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    You might find
    Code:
    (ade_projgetwscode)
    easier to work with than the output of CGEOCS since it doesn't add (read only) to the output.

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    You could have a reactor auto-loaded with your acaddoc.lsp file to monitor the cgeocs system variable. The reactor could then modify the text of an attribute within your designated block with the updated text. That way, your networked systems would change the text automatically, but outside of your office systems would not have that automatic edit ability.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  9. #9
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    306
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    Heh, I think I get what you're saying in regards to networked systems which I believe is that everyone should be mapped to one acadoc.lsp file, but we don't have anything like that for the acaddoc.lsp.

    Is that something you can simply map under the Files tab of Options?

    Thanks

  10. #10
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Text output based on cgeocs variable

    Copy or create an acaddoc.lsp in a networked path where each computer can access.

    You will then need to update your Support Files Search Path or the ACAD environment variable on each of these computers. You could create an acad.lsp file as mentioned by the cadpanacea.com; save it to the network location; then drag and drop that networked acad.lsp file into each computer. This would update your Support Files Search Path.

    Upon the next drawing open or the restart of AutoCAD, these new paths would allow for the autoloading of the acad.lsp and acaddoc.lsp files, which as mentioned in both links are user created and maintained files.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Page 1 of 2 12 LastLast

Similar Threads

  1. 2016: Lighting Device Tag Not Pulling Information
    By mit81 in forum Revit MEP - Families
    Replies: 1
    Last Post: 2016-01-05, 09:08 PM
  2. 2013: Can not see component when pulling in from properties bar?
    By revitnewbie in forum Revit - Platform
    Replies: 4
    Last Post: 2014-03-11, 03:07 PM
  3. Revit pulling it all together...
    By hand471037 in forum Revit - In Practice
    Replies: 60
    Last Post: 2007-03-23, 11:05 PM
  4. Trying To Plot (aka Pulling My Hair Out)
    By ryanmcin in forum Revit Architecture - General
    Replies: 10
    Last Post: 2005-11-09, 04:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •