BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JulieGreenwood
SAS Employee

I'll definitely be following this thread to see how she responds! Heart

grandpastyle13
Obsidian | Level 7
Well, like I had said, it's going to be about a month or so before it happens, so I have some time to work on it. I'm also sure that I'm going to be asking for a good deal of help getting things figured out. But it should end up great. I'm excited about it!
WarrenKuhfeld
Rhodochrosite | Level 12

My previous answers were written from the point of view of showing you things you could do.  My understanding though is you want to set up the program and then get her to run it, perhaps on some other machine.  If so, that is where my previous programs become problematic.  There is nothing all that hard, but where SAS looks for files (your current working directory) can vary.  @ChrisHemedinger and @Vince_SAS have done some corresponding about it.  If you choose to go that route, Chris can fill you in better than I can on the details and the challenges.  In the mean time, I offer you another alternative.  Using some code from a blog by Rick Wicklin, I wrote a program that does not depend on any image files.  I ended up making things a bit more complicated than they need to be just so I could get data skins.  I am not sure that helps much, but that is what I did.

data words;
   input line $hex40.;
   datalines;
4D79204461726C696E672C202020202020202020
57696C6C20202020202020202020202020202020
596F752020202020202020202020202020202020
4D61727279202020202020202020202020202020
4D653F2020202020202020202020202020202020
;

title;
footnote;
data message(drop=i line inc max);
   length draw $ 20;
   set words;
   x = 5; inc = 2.0; max = 11;
   do i = 1 to length(line);
      order + 1; y = max;
      do j = 1 to _n_ - 1;
         set words(rename=(line=draw)) point=j; y + -inc; k + 1; output;
         end;
      draw = substr(line, 1, i);
      y = max - _n_ * inc;
      if substr(line, i, 1) ne ' ' then do; k + 1; output; end;
   end;
   call symputx('maxorder', order);
run;

data _null_;
   set message(where=(order=&maxorder)) nobs=n1;
   call symputx('mino', k);
   call symputx('maxo', n1);
   stop;
run;

data message(drop=j k); /* Pause */
   set message end=eof;
   output;
   if eof then do j = 1 to 5;
      do i = &mino to &maxo; set message point=i; order + j; output; end;
   end;
run;

data background1;
   id1 = 1;
   x1 =  0; y1 =  0; output;
            y1 = 10; output;
   x1 = 10;          output;
            y1 =  0; output;
run;

data background2(drop=pi t r);
   id2 = 2;
   pi = constant('pi');
   do t = 0 to 2*pi by 0.01*pi/4;
      r = 2 - 2*sin(t) + sin(t)*sqrt(abs(cos(t))) / (sin(t)+1.4);
      x2 = r*cos(t) * 5 / 2.4 + 5;
      y2 = (r*sin(t) + 4) * 2;
      output;
   end;
run;

data all; merge background1 background2; run;

data all;
   set message;
   by order;
   output;
   if last.order then do;
      call missing(x, y, draw);
      do i = 1 to n;
         set all nobs=n point=i;
         output;
      end;
   end;
run;

ods _all_ close;
options papersize=('4 in', '4 in') printerpath=gif animation=start
        animduration=.5 animloop=yes noanimoverlay nonumber nodate nobyline;
ods printer file='demo1.gif';
ods graphics / width=4in height=4in imagefmt=gif;

proc sgplot data=all nowall noborder noautolegend aspect=1;
  by order;
  polygon x=x1 y=y1 id=id1 / fillattrs=(color=pink) fill dataskin=sheen;
  polygon x=x2 y=y2 id=id2 / fillattrs=(color=red)  fill dataskin=gloss;
  text    x=x y=y text=draw / 
          textattrs=(size=38 weight=bold color=white style=italic);
  xaxis min=0 max=10 display=none offsetmin=0 offsetmax=0;
  yaxis min=0 max=10 display=none offsetmin=0 offsetmax=0;
run;

options animation=stop byline;
ods printer close;
ods listingdemo1.gif

 

 

demo1.gif 

shwetaS
Calcite | Level 5

Interesting thread Smiley LOL       

 

 

Common... find a better way to propose her... Woman Happy

ChrisHemedinger
Community Manager

This has all of the ingredients for a perfect "question pop" -

 - it's about her, and what she's into

 - it shows creativity and initiative -- not just a store-bought Hallmark card for any occasion

 - and...you now have hundreds (maybe more) of community members rooting for you.  We probably won't (all) expect invitations to the wedding.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
grandpastyle13
Obsidian | Level 7

Those were exactly my thoughts when I got the idea to do this! Haha. 

 

We will definitely have to see about the wedding invitations - we had both discussed wanting a small wedding! lol

 

Joking aside, I greatly appreciate the positivity and support. 🙂

Reeza
Super User

You're using SAS UE then so need a different path, try:

 

ods printer file='/folders/myfolders/demo2.gif'; 

 

grandpastyle13
Obsidian | Level 7

Ah! Yes, that cleared the error. It works now. I'm able to open the .gif file, and it works properly.

 

😄

Reeza
Super User
I'm not sure if it shows as a gif in the window, you may have to go to the folder and open it manually...Though there may be a way around that. I'll see if I have some time to play with it later this weekend.
grandpastyle13
Obsidian | Level 7

You're correct, I have to open the .gif file manually. Which, truthfully, isn't really an issue. I just wanted to see how the final output and display of it would look, so that I have an idea of what, exactly, I'll be working with here. I have a pretty good idea of how I want the 'final product' to look, it's just a matter of figuring out how to do that within SAS. 

 

I think it would probably be best for me to first work on the 'image' that I have in my mind, and that way I can share it here with the community and go from there about figuring out how to make it happen, as you had suggested earlier?

Vince_SAS
Rhodochrosite | Level 12

The next project is to use the SAS Report Writing Interface to create your wedding invitations.

 

You realize that there is no end to this, right???

 

Vince DelGobbo

SAS R&D

grandpastyle13
Obsidian | Level 7

Hahaha! Oh boy. It seems that I may have opened up an infinite "rabbit hole"! 🙂

 

That's funny.

grandpastyle13
Obsidian | Level 7

Alright, so I have it figured out how I would like the message to look overall, and what I would like for it to do. Now, I just need everyone's help on figuring out how to make it happen! 🙂 

 

Hopefully I'm able to put this into terms that will make sense here... But, essentially, this is what I would like for it to look like and do:

 

1) I am going to need to have it be a .gif type image output, based on what I saw from the sample texts that @Reeza had provided.

 

2) For the background of the image, I would like for it to be a nice-looking heart, similar to this post: https://blogs.sas.com/content/iml/2011/02/14/a-parametric-view-of-love.html  

 

     2a) So, am I able to just create or choose an image of a heart, and have SAS upload that photo file to use as a background for the               program to run on?

 

3) Instead of just static text inside of the heart, as is in the post above, I would like for the utility to draw out the words "Will you marry me?" inside of the heart, so that when it loops as a .gif, it will just continue drawing out those letters

 

     3a) For this part, I would need to have SAS draw out each line segment of each letter, sequentially. Is anyone able to direct me to a              post or give me a sample code of how to draw just a "point A to point B" line with SAS?

 

Once again, and as always, I'm eternally grateful for everyone's support and help on this! You have all been so wonderful and inspiring. 🙂

 

-Brandon

 

 

WarrenKuhfeld
Rhodochrosite | Level 12

It occurs to me that rather than trying to draw letters one segment at a time you might begin with the entire message using some nice font but hidden under rectangles that are the same color as the background color.  Then you could move one or more rectangles away, animated, to reveal the message.  The eclipse animation blogs that @Jay54 and I have done provide examples of moving a shape across the screen.

 

https://blogs.sas.com/content/graphicallyspeaking/2017/08/20/fun-ods-graphics-eclipse-animation/

https://blogs.sas.com/content/graphicallyspeaking/2017/08/25/fun-ods-graphics-eclipse-animation-part...

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats