Jump to content
Developer Wiki and Function Reference Links ×

Connect 2 symbols by records formats


rebu1985

Recommended Posts

Hi guys,

 

I was wondering if it is possible to show on the drawing a symbol which i have created when I click on another symbol or write a name located on the record format of another symbol by a vectorscript.

I have drawn a basic window shape with some information associated by a record format. At the same time I have drawn the elevation of that window. Both are different symbols. I would like to show on the drawing the elevation when i click on the window by a vectorscript. I have around 20 windows so the idea is to have a general vectorscript to show them or writing something of the record format.

I have attached below an image of the idea.

 

Thank you so much guys for your help.

Captura de pantalla 2017-11-17 a las 9.58.13.png

Link to comment

If I understand you correctly, you want to place the elevation view of the window on the drawing. Is this correct?  Reading between the lines, it sounds like you are working just in 2D, not in 3D or Hybrid mode. And that what you really want to do is to look at the elevation of the window to make sure it is the one you want to use. If you have a different use case, please explain.

 

You realize that it will have to actually place the elevation symbol in the drawing. There is not way with Vectorscript to open a different drawing windows to show a symbol in. You can delete the elevation afterward.

 

Yes, that can be done by script.  Easiest way would be to store the symbol name of the Elevation view in a record-field attached to the plan view. The script would then read that field and place a copy of the elevation symbol. I would probably have it ask for you to click on a point to place the elevation symbol.

 

Does that sound like what you want?

Link to comment

Hi Pat,

I am going to explain it again but you are right. Sorry for my english.

 

I work in 2d all time and both symbols (floor and elevation) and done in plan view 2d. I would like to show a copy of the respective elevation of the window in top view which i have drawn when i click on the window top plan which i have drawn as well on the  top view.

I have drawn manually around symbols of 30 windows which their elevations. All of them have records formats so i think the best way as you said in connect them by a field and place a copy of the elevation symbol but i dont know how I can do it.

 

Thanks Pat,

Link to comment

OK. Here is kind of a demonstrator version. Does this do what you want?  Copy and place EVERYTHING inside the code block into a new blank Vectorscript editor window to create the script. Edit to use the proper Record and Field names in the Const section. Select a symbol in the drawing that has a proper symbol definition name in the field and run the script. You will now be able to place the related symbol in the drawing.

 

Procedure Place_Elev_Sym;
{© 2017 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{Sample code to show how to place a related symbol specified}
{by the symbol name stored in a Record-Field.}

{Edit the Const statements below for the proper Record and Field}
{names. Select an object in the drawing and run the script. The }
{Symbol Insertion tool will be activated with the symbol specified}
{in the Field_Name constant.}

{No error checking or trapping of any kind included. For }
{demonstration purposes only. This version will error if a selected}
{symbol has a Rec_Name/Field_Name combination that does not}
{return a valid symbol definition name.}

{Use at your own risk. No warranty expressed or implied. }
{Here be dragons. Use of Vectorscript may be addictive.}
{Ask you doctor if your heart is strong enough for Vectorscript.}

Const	Rec_Name='My_Format';
		Field_Name='Elev_Sym_Name';
Var	H1,H2:	Handle;
	S1:	String;
	
Begin
	H1:=FSActLayer;
	H2:=ActSymDef;
	S1:=GetRField(H1,Rec_Name,Field_Name);
	SetActSymbol(S1);
	CallTool(-209);
	SetActSymbol(GetSDName(H2));
End;

Run(Place_Elev_Sym);

 

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