cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Isodraw macro

SOLVED
Level 1

Isodraw macro

Dear Friends,

I am new for Isodraw macro's. Please any one guide me, How to create Isodraw macro and .ism file.

There any software using to create .ism file?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Isodraw macro

IsoDraw macros are simply created using a text editor. If you are just starting, I'd recommend just going in and recording a macro. You can then go open the file with a text editor and get a rough feel for what the language looks like.

If you have specific questions for a macro you are attempting to create feel free to post them.

5 REPLIES 5

Re: Isodraw macro

IsoDraw macros are simply created using a text editor. If you are just starting, I'd recommend just going in and recording a macro. You can then go open the file with a text editor and get a rough feel for what the language looks like.

If you have specific questions for a macro you are attempting to create feel free to post them.

Re: Isodraw macro

Yes, I recorded one macro, that is working good.

How can I create new macro using text editor?

Please Explain me Step by step procedure for create macro and edit...

Send print screen for create macro, It will be helpfull for understand easy. Otherwise send me any samples.

Re: Isodraw macro

If you are trying to learn how to make macros, please read through the macro help. Depending which version of IsoDraw you're working on, go under help and you'll either see a separate selection for macros or it will just be categorized under the normal help. Various samples are included in help as well as...help.

Best way to learn is to figure out a simple task you want to do. Then work through the help to do it. Use the forum if you get stuck on a step.

Re: Isodraw macro

arasu R wrote:

...How to create Isodraw macro and .ism file...

In main program (Arbortext IsoDraw) menu select "Macro" -> "Record macro".

Re: Isodraw macro

Can someone point me in the right direction? I know about recording macros and the Arbortext IsoDraw Macro Language Reference 7.2.pdf. I've been trying to learn coding and how the macro syntax works but need some foundational training. I'll give an example of what I'm trying to create as a macro and if anyone knows what or where I can go to learn macro coding to do this kind of macro coding.

Ex. I have a rectangle in my ISODraw document (this is our format border). I already have a macro that I created that will select all the text and art created for this particular document. Then aligns it all in the center of the rectangle border and then aligns to the bottom then moves it up a specific distance. So that every document of art we create is centered and at the same exact distance from the bottom of the border. The border does not change in width and the bottom of the border does not move. The height will change depending on the height of the art and text. To change the height we only will move the top of the rectangle border down to the correct height. Then I have a line created that aligns to the top of the art and text and then moves up a specific distance to mark the spot where the top of the border line should be snapped to. This is all automated through the macro. The part we have to do manually but I want to figure out how to code is as follows: We have to manually select the top of the rectangle and drag it down to snap to the point of where the line created ended up. This spot is always different because the art and text are different depending on the document.

I want to learn how to code the macro to get the coordinates of the front anchor point then apply that coordinate as the marker for where the height of the top left corner of the rectangle border will be readjusted to.

Hope this makes sense! My understanding is I need to make the coordinate of the created lines front anchor point into a float and have that apply to the coordinates for the top left of the rectangle but not sure where I go to learn this kind of coding that would apply to ISODraw macro language. I've tried looking into C, C++, or searching for stuff like "Beginning SAS/IML code macro" in Youtube and Google. But everything I come across is not helping me.

Please help.

Below is the example of the macro I have so far explained above. Keep in mind it does more the what I said but what I said is the important part relating to my question.

		################## AMPV - Position Art Text 2 ########################### #########################################################################
		################## by BLau 2017 ######################################### #########################################################################

Macro AMPV - Position Art Text 2 PROTECTED

	####DO NOT MAKE THIS MACRO A BUTTON####
	####Need Zoom Page to ensure Select Rectangle works correctly####
	Zoom page
	Select if Object_name contains '2017_Temp_ArrowPen_AlignBorderTop'
	Delete selection
		if (exists(activedoc.layers["ICN_TextBox"])=false) then
	define ICN_TextBox as layer
	ICN_TextBox = add layer "ICN_TextBox"
		end if
	ActiveDoc.Layers["ICN_TextBox"].Locked = false
	
		if (exists(activedoc.layers["No_Pen_Border"])=false) then
	define No_Pen_Border as layer
	No_Pen_Border = add layer "No_Pen_Border"
	Select none
	Activate layer "No_Pen_Border"
	Select if Type is equal to 'rectangle'
	Subselect if Pen is equal to '$ISO_NOPEN'
	Subselect if Color is equal to '$ISO_NOFILL'
	Subselect if Element is inside page completely
	Selected Elements to active layer
	Create object_info activeDoc.firstSelectedElement
	activeDoc.firstSelectedElement.info.name = "2017_Main_Stay_MainBorder_PenNoPen"
	activeDoc.firstSelectedElement.info.tip = "Do Not Move Bottom Position"
	Select none
	ActiveDoc.Layers["No_Pen_Border"].Locked = true
		end if
		
	####Selects ICN at Bottom Right Corner####
	Select rectangle 173.326 4.293 159.835 7.806 with_partial
	Delete selection
	
	Activate layer "Standard layer"
	ActiveDoc.Layers["Layer4"].Locked = true
	ActiveDoc.Layers["Layer3"].Locked = true
	ActiveDoc.Layers["No_Pen_Border"].Locked = true
		if (exists(activedoc.layers["ICN_TextBox"])=true) then
	ActiveDoc.Layers["ICN_TextBox"].Locked = true
		end if
	
	
	####Create Temp line so if there is no text to copy and paste this will be pasted####
	Create Line 4.389 (-23.335) 23.019 (-23.335)
	Create object_info activeDoc.firstSelectedElement
	activeDoc.firstSelectedElement.info.name = "2017_Temp_Line_if_no_Text"
	activeDoc.firstSelectedElement.info.tip = "Delete After Use"
	Cut

	####Selects around No pen border but Border is locked####
	Select rectangle 0.42 225.328 182.719 0.583
	Subselect if Type is equal to 'text'
	Subselect if Font_size is equal to 10
	Copy
	Convert text to paths
	Group Selection
	Create object_info activeDoc.firstSelectedElement
	activeDoc.firstSelectedElement.info.name = "2017_Temp_AlignTextPaths"
	activeDoc.firstSelectedElement.info.tip = "Delete After Use"

	Select none
	Paste same_Position
	Move selection 0 2
	
	####Selects around No pen border but Border is locked####
	Select rectangle 0.42 225.328 182.719 0.583
	Subselect if Type is equal to 'text'
	Subselect if Font_size is equal to 10
	DEFINE el AS Element
	el = activeDoc.firstSelectedElement
		WHILE (Exists (el) = true )
	Create Object_Info el
	el.info.name = "2017_Main_CalloutText_Arial10Normal"
	el.info.tip = "Do not Resize 10 pt"
	el = el.nextSelectedElement
		END while
	Select none
	
	####Selects around No pen border but Border is locked####
	Select rectangle 0.42 225.328 182.719 0.583

	Group Selection
	Select none
	ActiveDoc.Layers["No_Pen_Border"].Locked = false
	
	####Selects around No pen border####
	Select rectangle 0.211 219.28 179.993 1.026 with_partial

	Align medium
	Align bottom
	Select none
	Set active pen "ground"
	Create Line 3.174 212.724 10.772 212.724
		Set active style "Start arrow"

	Create object_info activeDoc.firstSelectedElement
	activeDoc.firstSelectedElement.info.name = "2017_Temp_ArrowPen_AlignBorderTop"
	activeDoc.firstSelectedElement.info.tip = "Delete After Use"
	
	ActiveDoc.Layers["No_Pen_Border"].Locked = true
	####Selects around No pen border but Border is locked####
	Select rectangle 0.42 225.328 182.719 0.583
	
	Align bottom
	Move selection 0 6.348

    Select none

	Select if Object_name contains '2017_Temp_AlignTextPaths'
	Delete selection

	####Selects around No pen border####
	Select rectangle 0.211 219.28 179.993 1.026 with_partial
	UnGroup Selection

	Subselect if Type is equal to 'text'
	Subselect if Font_size is equal to 10
	Move selection 0 (-2)
	
	##Maybe add lock here to 2017_Temp_ArrowPen_AlignBorderTop then select##
	
	####Selects all within border but not 2017_Temp_ArrowPen_AlignBorderTop####
	Select rectangle 176.591 215.002 4.423 4.575
	Group Selection
	
	####Selects around No pen border####
	Select rectangle 0.211 219.28 179.993 1.026 with_partial
	Align top
       
	Subselect if Type is equal to 'line'
	Move selection 0 3.174
	
	##Maybe add lock here to 2017_Temp_ArrowPen_AlignBorderTop then select##

	####Selects all within border but not 2017_Temp_ArrowPen_AlignBorderTop####
	Select rectangle 0.263 211.645 174.125 0.627
	UnGroup Selection
	Select at 178.86 (-4.778)
	Select if Font_size is equal to 10
	#Subselect if Element is inside page
	Activate layer "Layer2"
	Selected Elements to active layer
	Select none
			
	Activate layer "ICN_TextBox"	
	create text 173.06 4.82 stripExt(activedoc.name)
	text font "ariel"
	text align right
	text face normal
	text size 6
	Create object_info activeDoc.firstSelectedElement
	activeDoc.firstSelectedElement.info.name = "2017_Main_Stay_ICNText_Arial6Normal"
	activeDoc.firstSelectedElement.info.tip = "Do Not Move Position"
	select none
	
	Activate layer "Standard layer"
	Select if Object_name contains '2017_Temp_Line_if_no_Text'
	Delete selection
	Select none
	
	Select if Pen is equal to 'Arrow'
	Subselect if Object_name is not equal to '2017_Main_CalloutLine_PenArrow'
	
	el = activeDoc.firstSelectedElement
		WHILE (Exists (el) = true )
	Create Object_Info el
	el.info.name = "2017_Main_CalloutLine_PenArrow"
	el.info.tip = "0.375 Min Length"
	el = el.nextSelectedElement
		END while
	Select none
	Select if Pen is equal to 'ArrowShadow'
	Subselect if Object_name is not equal to '2017_Main_CalloutLine_PenArrow'
	el = activeDoc.firstSelectedElement
		WHILE (Exists (el) = true )
	Create Object_Info el
	el.info.name = "2017_Main_CalloutLine_PenArrow"
	el.info.tip = "0.375 Min Length"
	el = el.nextSelectedElement
		END while
	Select none
	
	ActiveDoc.Layers["Layer2"].printable = true
	ActiveDoc.Layers["Layer2"].exportable = true
	ActiveDoc.Layers["Standard layer"].printable = true
	ActiveDoc.Layers["Standard layer"].exportable = true
	ActiveDoc.Layers["Layer4"].Locked = true
	ActiveDoc.Layers["Layer4"].printable = false
	ActiveDoc.Layers["Layer4"].exportable = false
	ActiveDoc.Layers["Layer4"].visible = true
	ActiveDoc.Layers["Layer3"].Locked = true
	ActiveDoc.Layers["Layer3"].printable = false
	ActiveDoc.Layers["Layer3"].exportable = false
	ActiveDoc.Layers["Layer3"].visible = true
	ActiveDoc.Layers["ICN_TextBox"].Locked = true
	ActiveDoc.Layers["ICN_TextBox"].printable = true
	ActiveDoc.Layers["ICN_TextBox"].exportable = true
	ActiveDoc.Layers["ICN_TextBox"].visible = true
	ActiveDoc.Layers["No_Pen_Border"].Locked = false
	ActiveDoc.Layers["No_Pen_Border"].printable = true
	ActiveDoc.Layers["No_Pen_Border"].exportable = true
	ActiveDoc.Layers["No_Pen_Border"].visible = true
		
	Set active pen "Medium"
	Zoom page
	activedoc.window.preview = 0

End Macro