Jump to content
  • 0

Worksheets and Dimensions.


RussU

Question

Hi everyone.. bit of a problem I can't address.

 

I've a large batch of A1 sheets, with associated dimensions. I want to make a worksheet up which lists the dimension properties and apply a new text style en-masse, so that when printed at A3 the text is bigger, and legible.

 

Trouble is, I go to, "Tools - Reports - Create report" and everything else from Sheet borders to Callouts to Drawing label,  has a big list in the "possible columns" area... but dimensions has none at all!

I did try to list every "object is type Dimension" and then add a column header of =TSTY to get the list, but the worksheet completely fails... is there something I need to do to list the dimension properties?

Link to comment

9 answers to this question

Recommended Posts

  • 0

OK.

 

This script should change the TextStyle of every dimension in a Selected Sheet Layer Viewport to whatever Text Style you put in in the CONST portion of the script.

 

If you like this and have enough viewports to make it worth while, this basic script could be put in a wrapper that would step through all of the viewports in the document or all of the selected viewports. Let me know if this makes sense.

 

Copy everything in the following code block and paste it into a new blank script created from the Resource Manager.

 

Procedure ChangeDimTextInViewportAnnotations;

{November 29, 2016}
{© 2008-2016, Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{This script will edit the text properties of a dimension object}
{in the Annotations Group of a Sheet Layer Viewport.}
{Edit the Const definitions and uncomment the respective part of}
{the Change function as necessary to effect the needed changes}


{No Warranty Expressed or Implied}
{Use on a backup copy of your file at your own risk}
{Do not use while operating a motor vehicle or heavy machinery}
{Use may cause heart palpitations, acne, and dandruff}
{If aggrevation persists, consult a doctor.} 

{This script is intended to also act as a template for other scripts}
{to modify objects in the Annotations group of Sheet Layer Viewports}
{As such, extra code has been included and commented for ease of}
{future changes.}

Const	{Font='Verdana';}
		Text_Style='Notes 12 pt';  {Set this line to the EXACT}
									{name of the text style to change to}
		{FontSize=14;}


var	Hd: Handle;



Function Change(Hd:Handle):boolean;

Begin
if GetType(Hd)= 63 then 
	begin
		{SetTextFont(Hd, 0,len(gettext(Hd)),GetFontID(Font));} (*Change Font *)
		SetTextStyleRef(Hd, Name2Index(Text_Style));
	end
else 
	Begin
		{message('GetType ',gettype(Hd));
		sysbeep;
		wait(1);}
	end;
end;


Begin
	ForEachObjectInList(Change,1,1,FinGroup(GetVPGroup(FSActLayer,2)));
	RedrawAll;
end;

Run(ChangeDimTextInViewportAnnotations);

 

  • Like 1
Link to comment
  • 0

Tools: Custom Selection will allow you to select the Dimensions and then use the Menus or OIP to change them in Bulk.

 

You can use a worksheet to display the data, but since these are not Record-Fields, you will not be able to make the changes from the Worksheet. You can Right Click on the database row to Select a given object and then use the Menus/OIP to change.

 

Set up a database row with Criteria of:

 

 

Then in the database header row (Row 3 in the image) set the formulas to the values I have shown in Row 2. I entered the exact same formulas in Row 2 but with a space in front so they show as text instead of working as a formula.

 

  • Like 1
Link to comment
  • 0
42 minutes ago, Pat Stanford said:

Tools: Custom Selection will allow you to select the Dimensions and then use the Menus or OIP to change them in Bulk.

 

You can use a worksheet to display the data, but since these are not Record-Fields, you will not be able to make the changes from the Worksheet. You can Right Click on the database row to Select a given object and then use the Menus/OIP to change.

 

Set up a database row with Criteria of:

 

 

 

Then in the database header row (Row 3 in the image) set the formulas to the values I have shown in Row 2. I entered the exact same formulas in Row 2 but with a space in front so they show as text instead of working as a formula.

 

 

Hi Pat, thanks for that, great answer and work around.

Can I do that when the dims are inside the viewports? at the moment I am opening up each SLVP, and doing a ctrl-A, and then right clicking on a text style in the resource broswer and clicking apply.... it works, but laborious. (I should have set them to a text style on initial creation... would have saved myself a lot of work!)

 

Your image with the database creation parameters didn't post.. so could you resend it please?

 

Thanks ever so much.... I'm still relatively new to worksheets!

 

I might be picking your brains later down the line as I'm pretty good with SQL and access, and want to learn more about the ODBC connections at some point!

 

**- Edit -** I've just tried the custom selection, and if you're in the annotation space of a viewport, then it's great (save for having chain dims select differently to regular dims) but outside of a viewport, they're not selected.... shame... nice solution thwarted...

 

 

Edited by RussU
Link to comment
  • 0

I edited my previous message to include the screen shots.

 

I have some scripts somewhere to edit text objects in Viewport Annotations. Let me see if I can dig them out.

 

I just tried the Custom Selection with the Viewport Annotation option checked and it did select the dimensions inside the viewports, VW just won't let you change them from outside the viewport. So using the Custom Selection to get everything, you then would only have to enter the annotations and make the changes. Still a lot of work depending on the number of viewports, but better than having to do the Custom Selection inside each one. But even that, if you saved the selection as a VectorScript would not be too bad.

Link to comment
  • 0

You are correct that Chain Dimensions are a different type. Even though they show in the OIP as Dimension, they are actually a Plugin Object. Here is a version of the script that properly handles both regular and chain dimensions.

 

Procedure ChangeDimTextInViewportAnnotations;

{November 30, 2016}
{© 2008-2016, Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{This script will edit the text properties of a dimension object}
{in the Annotations Group of a Sheet Layer Viewport.}
{Edit the Const definitions and uncomment the respective part of}
{the Change function as necessary to effect the needed changes}

{11/30/2016  Revised to handle Chain Dimensions}

{No Warranty Expressed or Implied}
{Use on a backup copy of your file at your own risk}
{Do not use while operating a motor vehicle or heavy machinery}
{Use may cause heart palpitations, acne, and dandruff}
{If aggrevation persists, consult a doctor.} 

{This script is intended to also act as a template for other scripts}
{to modify objects in the Annotations group of Sheet Layer Viewports}
{As such, extra code has been included and commented for ease of}
{future changes.}

Const	{Font='Verdana';}
		Text_Style='Title Block 12 pt';  {Set this line to the EXACT}
									{name of the text style to change to}
		{FontSize=14;}


var	Hd: Handle;



Function Change(Hd:Handle):boolean;

Begin
if GetType(Hd)= 63 then 
	begin
		{SetTextFont(Hd, 0,len(gettext(Hd)),GetFontID(Font));} (*Change Font *)
		SetTextStyleRef(Hd, Name2Index(Text_Style));
	end
else 
	Begin
		if ((GetType(Hd)=86) & (EvalStr(Hd,ST)='NNA_ChainDim'))then 
			Begin
				SetTextStyleRef(Hd,Name2Index(Text_Style));
			End;
	end;
end;


Begin
	ForEachObjectInList(Change,1,1,FinGroup(GetVPGroup(FSActLayer,2)));
	SetZoom(GetZoom); {this is a workaround to get screen to update}
end;

Run(ChangeDimTextInViewportAnnotations);

 

  • Like 1
Link to comment

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
Answer this question...

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