Community
EAGLE Forum
Welcome to Autodesk’s EAGLE Forums. Share your knowledge, ask questions, and explore popular EAGLE topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flip View with ULP

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
jeyeffkay
809 Views, 11 Replies

Flip View with ULP

Hello!

 

In an update not that long ago (I think in 8.3) the "flip view" function got added which is useful for the bottom layer.

Is there a way to use it in an ULP? I can´t seem to find it in the documentation.

Edit: A facebook post from Autodesk EAGLE from the 20.10.2017 said that the official name of this feature is "Flip Board".

Labels (1)
  • ULP
11 REPLIES 11
Message 2 of 12
jorge_garcia
in reply to: jeyeffkay

Hi @jeyeffkay,

 

I hope this message finds you well. If you want it called from a ULP you have to use the 

 

WINDOW FLIP;

 

To get it back to normal you have to run the command again.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 3 of 12
jeyeffkay
in reply to: jorge_garcia

Thank you very much!

I tried to implement it in my ulp:

if(output_selected[7] == 1)
					{
						for(int count = 0; count < NumberParts; count++)
						{

							WINDOW FLIP;
							if(flag == 0)
							{		
								create_scriptfile(PartPackageBOM[count],PartValueBOM[count],directory,PartName[count],quality,count,PartQuantity[count]);	
							}
	
							WINDOW FLIP;					
						}
					}
					delete_header();
					break;

This is a part of my program and here it should create a picture of the board. As you can see, I want to have it flipped and then "reflipped".

But right now it I get an error: "Unknown identifier 'WINDOW'"

Is there something I have missed?

Message 4 of 12
jorge_garcia
in reply to: jeyeffkay

Hi @jeyeffkay,

 

Some clarification is in order. ULPs on their own can't modify anything so you can't just add in script commands into the ULP. The ULP needs to write the command into a script and then pass that along to electronics on exit to perfrom the operation. 

 

This is the method all ULPS that modify the design follow. They pass a string of commands on exit to EAGLE which then runs those commands.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 5 of 12
jeyeffkay
in reply to: jorge_garcia

Hi @jorge_garcia,

 

thank you, that is a very helpful information!

If I understand it right, the ULP has to write the 'WINDOW FLIP' command into a script which than gets executed.

Is there documentation on how to do it?

Or ist there a rather simple comand which can do this?

 

Best regards

Jeyeffkay

Message 6 of 12
jorge_garcia
in reply to: jeyeffkay

Hi @jeyeffkay,

 

See the ex-run-script.ulp to see how this works. Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 7 of 12
jeyeffkay
in reply to: jorge_garcia

Hi @jorge_garcia,

I am very thankful that you are helping and also sorry that I have that many, and proberbly stupid, questions but I am very confident that this could be my last for now:

 

Thank you for suggesting the ex-run-script it has shown me how it works.

The Window Flip command now works like charm and does exactly want I want it to.

But now I have the following problem, at least I think that it is whats happening:

The exit() command closes the ulp and opens the scr. But is there a way to only execute the script, running it and than continuing with the ulp?

Because the script should flip the Board and than the ulp should continue doing what it does.

And ideally it should be able to "reexecute" it later.

 

Best regards

Jonte

Message 8 of 12
jorge_garcia
in reply to: jeyeffkay

Hello @jeyeffkay,

 

Hey no worries, no such thing as a dumb question. So the way we normally workaround these things is that in script that you generate you have it call the ULP and pass an argument that allows the ULP to continue where it left off. There's no good ways to interrupt execution of the ULP and let it continue where it left off.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 9 of 12
jeyeffkay
in reply to: jorge_garcia

Hi @jorge_garcia,

 

that sounds very good as a solution. But sadly I couldn´t find how the argument which the script passes to the ULP has to look like in order to continue where it got closed. Is there an example which I could have missed?

 

Best regards

Jonte

Message 10 of 12
jorge_garcia
in reply to: jeyeffkay

Hi @jeyeffkay,

 

I hope you're doing well. The argc and argv variables contain the information about the arguments that have been passed to a ULP


int argc

number of arguments given to the RUN command

 

string argv[]

arguments given to the RUN command (argv[0] is the full ULP file name)

 

To get an example of how arguments might be passed to a ULP see this example:

RUN cmd-draw-polygon-contours-as-wire SIGNALNAME [FILLING] [Layernumber]

 

THe first thing after RUN is the name of the ULP then separated by spaces you put in each individual argument. In the example above the arguments are SIGNALNAME, [FILLING] , and [Layernumber]

 

Let me know if you continue to run into problems.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 11 of 12
jeyeffkay
in reply to: jorge_garcia

Hi @jorge_garcia,

it´s been a while but thank you very much, now everything works like I want it to.

But is there a way of not mirroring the text ot mirror it again? With Window Flip the board gets mirrored, which is good, but there is text on top of it, is there there a way to keep it "normal"?

 

Best regards,

Jeyeffkay

Message 12 of 12
jorge_garcia
in reply to: jeyeffkay

Hi @jeyeffkay,

 

I hope you're doing well. Always one of the layer texts will appear mirrored because you are looking at both side with "XRAY VISION". So in that scenario whatever layer is in the back will have it's text mirrored.

 

Only way to see that text un-mirrored is to flip the board back.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report