automatic texts in object
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-12 11:53 AM
Is there a way to make title block object so, that
it will not list drawings done in 1:1 scale?
Problem occurs when adding a 1:1 scale drawing
(like automatic drawing list) to the layout.
Automatic text lists all scales which can be
confusing when inserted lists and tables are not "real" drawings.
So is it possible to split <DRAWINGSCALE> parameter so that
if scale is for example 1:1 object will not list it?
could u help me with the code plz?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-12 09:07 PM
If you don't want a drawing title just select "No Title" in the dialog settings.
If you don't want it in numbered in the layout's drawing list, then uncheck "Include Drawing in ID Sequence"
Sorry if I have not understood. There is a way to tell within a drawing title the scale of the associated drawing, but it is a bit of a pain since the information is provided as a formatted string rather than a numerical value.
If you do need this function in the title the code is something like this:
IF STRSTR(AC_DrawingScale, "1:1") > 0 THEN...This tests to see if the substring "1:1" is contained within the returned value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-13 08:56 AM
I'm sorry I know I wasn't very clear with this, but I quess
your answer was close. I'm not such an expert with gdl,
so I can't figure it out yet.
So I'm placing a title text (object) in to the layout. That text
is listing all the scales of the drawings placed in the layout,
just like automatic text <DRAWINGSCALE> does. Problem
is that it also lists tables, schedules, etc., and gives 1:1 scale for
them. For example: 1:50, 1:1. That's confusing if you
only have 1:50 scaled drawings placed in the layout.
Here is a poor example what kind of an object I'm after for:
IF STRSTR("<DRAWINGSCALE>", "1:1") > 0 THEN
text2 0, 0, "Happy" ! here should be new text string without 1:1 scale
else
text2 0, 0, "<DRAWINGSCALE>"
endif
So basically the formula should split <DRAWINGSCALE> -parameter according commas and determine if some string part value is "1:1" and remove it from the string....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-13 03:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-15 08:32 AM
The result is not even "happy", as it should be with 1:50 and 1:1
drawings placed in the layout.
Maybe its because of this <DRAWINGSCALE> is global parameter, which is text rather than numbers?
I also tried this with 1:50 and 1:1 drawings placed in
layout:
n = SPLIT ("<DRAWINGSCALE>", "%n:%n, %n:%n", num1, dot1, scl_1, com1, num2, dot2, scl_2)
PRINT num1, com1, scl_1, dot1, num2, com2, scl_2
Printed result was a punch of zeroes. So is it impossible to get values out
from <DRAWINGSCALE> ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-15 11:19 AM
So is it impossible to get values outYes: Impossible.
from <DRAWINGSCALE>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-15 03:50 PM
cejava1 wrote:I just looked closer and realized that you are using the autotext <DRAWINGSCALE> and not the parameter name DrawingScale (without the carets).
So is it impossible to get values out
from <DRAWINGSCALE> ??
From the parameter you can extract stings to test for different scales and assign numerical vales accordingly. It's a pain but, it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-29 09:56 AM
Because of many variables in project its point to make an object where user can choose if values are coming from Project Info Box or from ie. Layout name or from Subsetname.
Otherwise it seems to work just fine, but too wide text strings with autotext really creates a problem. That happens especially if trying to list individual drawing names and their scales in layout. Textbox and Paragraph commands are not working properly with autotext. Its weird because it looks alright in object's Real 2D-window, but when object is placed in layout text is just in single row or rows are tiled funny. Normal text can be splitted to different rows quite easily.
This forum have had this conversation already with earlier versions of AC, but is it still so that it is impossible to get a numeric return for drawing scales and -names in the layout? And and I mean a single object not a Title Type attached to single drawing.
If this is the case there is not really any real use for Info Box and there is a great lack in the program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-29 12:58 PM
!»» Example with automatic scale string of drawing stamps scaleS=AC_DrawingScale !»» CONVERT SCALE-STRING TO NUMERIC scaleN=0 !»» Cut of "M" at the beginning. Not needed. s=STRSTR(scaleS,"M") IF s THEN scaleS=STRSUB(scaleS,s+1,STRLEN(scaleS)-s) !»» Imperial or metric? s=STRSTR(scaleS,"=") !»» Converting ... IF s THEN !»» Scale notation is imperial sts=SPLIT(STRSUB(scaleS,1,s-1),"%n",lengthR) sts=SPLIT(STRSUB(scaleS,s+1,STRLEN(scaleS)-s),"%n",lengthP) IF lengthR THEN scaleN=lengthP/lengthR ELSE scaleN=MAX(lengthP,0) ELSE !»» Scale notation is metric IF NOT(scaleS="auto") THEN s=STRSTR((scaleS,":") IF s THEN sts=SPLIT(STRSUB(scaleS,1,s-1),"%n",lengthR) sts=SPLIT(STRSUB(scaleS,s+1,STRLEN(scaleS)-s),"%n",lengthP) IF lengthR THEN scaleN=lengthP/lengthR ELSE scaleN=MAX(lengthP,0) ELSE sts=SPLIT(scaleS,"%n",scaleN) ENDIF ENDIF ENDIF !»» scaleN contains the divisor of the scale. !»» CONVERT NUMERIC TO IMPERIAL NOTATION IF scaleN<2000 AND NOT(scaleN>=100 AND FRA(scaleN/10)<0.001 ) THEN scaleI=STR("%^.128fi",1" * 12/scaleN)+´=1'0"´ ELSE scaleI=´1"=´+STR("%^.32ffi",scaleN*1") ENDIF !»» scaleI contains the imperial scale string. !»» CONVERT NUMERIC TO METRIC NOTATION praefix="M " IF scaleN<1 THEN scaleM=praefix+STR("%^.0m",1/scaleN)+":1" ELSE scaleM=praefix+"1:"+STR("%^.0m",scaleN) ENDIF !»» scaleM contains the metric scale string. !»» PRINT RESULTS txt="»»"+scaleS+"««" txt=txt+" »»"+STR("%.3",scaleN)+"««" txt=txt+" »»"+scaleI+"««" txt=txt+" »»"+scaleM+"««" TEXT2 0,0,txt END
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2007-03-29 02:11 PM
I tried it as Title Type attached to single drawing and like you said it worked perfectly and took needed strings out from the drawing.
However, unless I'm an idiot, as it might be the case in here, this object can only work as a Title Type object and has to be attached to the drawing.
I'm looking for normal object wich lists all scales of all drawings placed in the layout.
With autotext <drawingscale> it works, but long string has to be divided to many rows of text.
So if its possible to do with normal object class, it needs maybe REQUEST-command for AC_DrawingScale parameter?
Wich can not be done, right? arghh..